diff --git a/lib/presentation/modules/dashboard/views/dashboard_view.dart b/lib/presentation/modules/dashboard/views/dashboard_view.dart index b6987892..e67d5c1f 100644 --- a/lib/presentation/modules/dashboard/views/dashboard_view.dart +++ b/lib/presentation/modules/dashboard/views/dashboard_view.dart @@ -28,34 +28,31 @@ class _DashboardViewState extends State @override void didChangeAppLifecycleState(AppLifecycleState state) { - if (state == AppLifecycleState.paused) { - } + if (state == AppLifecycleState.paused) {} - if (state == AppLifecycleState.resumed) { - } + if (state == AppLifecycleState.resumed) {} } @override Widget build(BuildContext context) { - const routes = [ - OrdersRoute(), - DraftOrdersRoute(), - ProductsRoute(), - CollectionsRoute(), - CategoriesRoute(), - CustomersRoute(), - GroupsRoute(), - DiscountsRoute(), - GiftCardsRoute(), - PricingRoute(), - StoreSettingsRoute(), - AppSettingsRoute(), - ]; return AnnotatedRegion( value: context.systemUiOverlayNoAppBarStyle, child: AutoTabsRouter( homeIndex: 0, - routes: routes, + routes: const [ + OrdersRoute(), + DraftOrdersRoute(), + ProductsRoute(), + CollectionsRoute(), + CategoriesRoute(), + CustomersRoute(), + GroupsRoute(), + DiscountsRoute(), + GiftCardsRoute(), + PricingRoute(), + StoreSettingsRoute(), + AppSettingsRoute(), + ], transitionBuilder: (context, child, animation) => child, builder: (context, child) => child, ), diff --git a/lib/presentation/modules/settings_module/app_settings/app_dev_settings.dart b/lib/presentation/modules/settings_module/app_settings/app_dev_settings.dart index abd69852..bbc9a63e 100644 --- a/lib/presentation/modules/settings_module/app_settings/app_dev_settings.dart +++ b/lib/presentation/modules/settings_module/app_settings/app_dev_settings.dart @@ -53,9 +53,9 @@ class AppDevSettingsView extends StatelessWidget { return Scaffold( body: NestedScrollView( headerSliverBuilder: (context, innerBoxIsScrolled) => [ - MedusaSliverAppBar( - title: const Text('App Dev Settings'), - actions: const [ + const MedusaSliverAppBar( + title: Text('App Dev Settings'), + actions: [ Padding( padding: EdgeInsets.all(16.0), child: Icon(Icons.settings, size: 28.0), diff --git a/lib/presentation/modules/settings_module/app_settings/order_settings/views/order_settings_view.dart b/lib/presentation/modules/settings_module/app_settings/order_settings/views/order_settings_view.dart index 09556772..2ce32fc2 100644 --- a/lib/presentation/modules/settings_module/app_settings/order_settings/views/order_settings_view.dart +++ b/lib/presentation/modules/settings_module/app_settings/order_settings/views/order_settings_view.dart @@ -49,11 +49,12 @@ class OrderSettingsView extends StatelessWidget { title: const Text('Order Settings'), actions: [ TextButton( - onPressed: () { + onPressed: mapEquals(controller.orderPreference.toJson(), + PreferenceService.orderPreference.toJson()) ? null : () { PreferenceService.instance .updateOrderSettings(controller.orderPreference); OrdersController.instance.update(); - context.popRoute(); + context.router.popForced(); }, child: const Text('Save')) ],