From 493215583c3c921dfe6aed837fdc1d299f654b61 Mon Sep 17 00:00:00 2001 From: Shawn Date: Thu, 16 Feb 2023 00:33:00 -0700 Subject: [PATCH] Remove unnecessary stack from appScaffold --- lib/ui/app_scaffold.dart | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/lib/ui/app_scaffold.dart b/lib/ui/app_scaffold.dart index e23821b0..8c35fe1a 100644 --- a/lib/ui/app_scaffold.dart +++ b/lib/ui/app_scaffold.dart @@ -13,22 +13,20 @@ class WondersAppScaffold extends StatelessWidget { _style = AppStyle(screenSize: context.sizePx); Animate.defaultDuration = _style.times.fast; appLogic.handleAppSizeChanged(context.mq.size); - return Stack( + return KeyedSubtree( key: ValueKey($styles.scale), - children: [ - Theme( - data: $styles.colors.toThemeData(), - // Provide a default texts style to allow Hero's to render text properly - child: DefaultTextStyle( - style: $styles.text.body, - // Use a custom scroll behavior across entire app - child: ScrollConfiguration( - behavior: AppScrollBehavior(), - child: child, - ), + child: Theme( + data: $styles.colors.toThemeData(), + // Provide a default texts style to allow Hero's to render text properly + child: DefaultTextStyle( + style: $styles.text.body, + // Use a custom scroll behavior across entire app + child: ScrollConfiguration( + behavior: AppScrollBehavior(), + child: child, ), ), - ], + ), ); } }