style fix

This commit is contained in:
julian 2023-04-11 08:28:05 -06:00
parent b667514662
commit aeaad39182

View file

@ -22,7 +22,6 @@ class CustomTabView extends StatefulWidget {
} }
class _CustomTabViewState extends State<CustomTabView> { class _CustomTabViewState extends State<CustomTabView> {
final _key = GlobalKey();
late int _selectedIndex; late int _selectedIndex;
static const duration = Duration(milliseconds: 250); static const duration = Duration(milliseconds: 250);
@ -80,17 +79,17 @@ class _CustomTabViewState extends State<CustomTabView> {
: CrossFadeState.showSecond, : CrossFadeState.showSecond,
duration: const Duration(milliseconds: 250), duration: const Duration(milliseconds: 250),
), ),
],
),
),
),
),
),
],
),
const SizedBox( const SizedBox(
height: 19, height: 19,
), ),
],
),
),
),
),
),
],
),
Stack( Stack(
children: [ children: [
Container( Container(
@ -117,7 +116,6 @@ class _CustomTabViewState extends State<CustomTabView> {
], ],
), ),
AnimatedSwitcher( AnimatedSwitcher(
key: _key,
duration: duration, duration: duration,
transitionBuilder: (child, animation) { transitionBuilder: (child, animation) {
return FadeTransition( return FadeTransition(
@ -135,7 +133,7 @@ class _CustomTabViewState extends State<CustomTabView> {
); );
}, },
child: AnimatedAlign( child: AnimatedAlign(
key: Key(widget.titles[_selectedIndex]), key: Key("${widget.titles[_selectedIndex]}_customTabKey"),
alignment: Alignment.topCenter, alignment: Alignment.topCenter,
duration: duration, duration: duration,
child: Padding( child: Padding(