Fix arrow btn on home view

This commit is contained in:
Shawn 2022-09-12 11:04:53 -06:00
parent b1f0bed1cc
commit 7ff835c4a0

View File

@ -159,17 +159,17 @@ class _HomeScreenState extends State<HomeScreen> with SingleTickerProviderStateM
duration: $styles.times.fast, duration: $styles.times.fast,
child: RepaintBoundary( child: RepaintBoundary(
key: ObjectKey(currentWonder), key: ObjectKey(currentWonder),
child: IgnorePointer( child: OverflowBox(
ignoringSemantics: false, child: Column(
child: OverflowBox( mainAxisSize: MainAxisSize.min,
child: Column( children: [
mainAxisSize: MainAxisSize.min, SizedBox(width: double.infinity),
children: [ const Spacer(),
SizedBox(width: double.infinity),
const Spacer(),
/// Title Content /// Title Content
LightText( LightText(
child: IgnorePointer(
ignoringSemantics: false,
child: MergeSemantics( child: MergeSemantics(
child: Transform.translate( child: Transform.translate(
offset: Offset(0, 30), offset: Offset(0, 30),
@ -196,32 +196,32 @@ class _HomeScreenState extends State<HomeScreen> with SingleTickerProviderStateM
), ),
), ),
), ),
),
/// Animated arrow and background /// Animated arrow and background
/// Wrap in a container that is full-width to make it easier to find for screen readers /// Wrap in a container that is full-width to make it easier to find for screen readers
MergeSemantics( MergeSemantics(
child: Container( child: Container(
width: double.infinity, width: double.infinity,
alignment: Alignment.center, alignment: Alignment.center,
/// Lose state of child objects when index changes, this will re-run all the animated switcher and the arrow anim /// Lose state of child objects when index changes, this will re-run all the animated switcher and the arrow anim
key: ValueKey(_wonderIndex), key: ValueKey(_wonderIndex),
child: Stack( child: Stack(
children: [ children: [
/// Expanding rounded rect that grows in height as user swipes up /// Expanding rounded rect that grows in height as user swipes up
Positioned.fill( Positioned.fill(
child: _buildSwipeableArrowBg(), child: _buildSwipeableArrowBg(),
), ),
/// Arrow Btn that fades in and out /// Arrow Btn that fades in and out
_AnimatedArrowButton(onTap: _showDetailsPage, semanticTitle: currentWonder.title), _AnimatedArrowButton(onTap: _showDetailsPage, semanticTitle: currentWonder.title),
], ],
),
), ),
), ),
Gap($styles.insets.md), ),
], Gap($styles.insets.md),
), ],
), ),
), ),
), ),