diff --git a/lib/pages/app_scaffold.dart b/lib/pages/app_scaffold.dart index d9d8a52..d5c6dc9 100644 --- a/lib/pages/app_scaffold.dart +++ b/lib/pages/app_scaffold.dart @@ -107,56 +107,39 @@ class AppScaffold extends ConsumerWidget { ) : null, ) - : PopScope( - canPop: selectedSection == AppPage.conversions, - onPopInvokedWithResult: (didPop, result) { - if (selectedSection == AppPage.settings) { - context.go('/'); - } else if (selectedSection == AppPage.reorder) { - context.goNamed('settings'); - } else if (selectedSection == AppPage.reorderDetails) { - //2 sided page - if (_isDrawerFixed) { - context.goNamed('settings'); - } else { - context.goNamed('reorder-units'); - } - } - }, - child: Scaffold( - drawer: drawer, - body: SafeArea(child: child), - floatingActionButtonLocation: - FloatingActionButtonLocation.endContained, - bottomNavigationBar: selectedSection == AppPage.conversions - ? BottomAppBar( - child: Row( - mainAxisSize: MainAxisSize.max, - children: [ - IconButton( - tooltip: AppLocalizations.of(context)!.search, - icon: const Icon(Icons.search), - onPressed: openSearch, - ), - IconButton( - tooltip: AppLocalizations.of(context)!.calculator, - icon: const Icon(Icons.calculate_outlined), - onPressed: openCalculator, - ), - ], - ), - ) - : null, - floatingActionButton: (selectedSection == AppPage.conversions && - MediaQuery.viewInsetsOf(context).bottom == 0) - ? FloatingActionButton( - key: const ValueKey('clearAll'), - onPressed: () => clearAll(_isDrawerFixed), - tooltip: AppLocalizations.of(context)!.clearAll, - child: const Icon(Icons.clear_outlined), - ) - : null, - ), + : Scaffold( + drawer: drawer, + body: SafeArea(child: child), + floatingActionButtonLocation: + FloatingActionButtonLocation.endContained, + bottomNavigationBar: selectedSection == AppPage.conversions + ? BottomAppBar( + child: Row( + mainAxisSize: MainAxisSize.max, + children: [ + IconButton( + tooltip: AppLocalizations.of(context)!.search, + icon: const Icon(Icons.search), + onPressed: openSearch, + ), + IconButton( + tooltip: AppLocalizations.of(context)!.calculator, + icon: const Icon(Icons.calculate_outlined), + onPressed: openCalculator, + ), + ], + ), + ) + : null, + floatingActionButton: (selectedSection == AppPage.conversions && + MediaQuery.viewInsetsOf(context).bottom == 0) + ? FloatingActionButton( + key: const ValueKey('clearAll'), + onPressed: () => clearAll(_isDrawerFixed), + tooltip: AppLocalizations.of(context)!.clearAll, + child: const Icon(Icons.clear_outlined), + ) + : null, ); return Shortcuts( diff --git a/packages/calculator_widget/pubspec.lock b/packages/calculator_widget/pubspec.lock index e2b9534..624fc38 100644 --- a/packages/calculator_widget/pubspec.lock +++ b/packages/calculator_widget/pubspec.lock @@ -66,10 +66,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "5.0.0" flutter_localizations: dependency: transitive description: flutter @@ -124,10 +124,10 @@ packages: dependency: transitive description: name: lints - sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" + sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "5.0.0" matcher: dependency: transitive description: @@ -256,10 +256,10 @@ packages: dependency: transitive description: name: vm_service - sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "14.2.4" + version: "14.2.5" sdks: - dart: ">=3.3.0 <4.0.0" + dart: ">=3.5.0 <4.0.0" flutter: ">=3.18.0-18.0.pre.54" diff --git a/packages/calculator_widget/pubspec.yaml b/packages/calculator_widget/pubspec.yaml index 595cec7..900950a 100644 --- a/packages/calculator_widget/pubspec.yaml +++ b/packages/calculator_widget/pubspec.yaml @@ -22,7 +22,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^4.0.0 + flutter_lints: ^5.0.0 flutter: uses-material-design: true diff --git a/packages/translations/pubspec.lock b/packages/translations/pubspec.lock index 15a91c3..a4bb21c 100644 --- a/packages/translations/pubspec.lock +++ b/packages/translations/pubspec.lock @@ -193,10 +193,10 @@ packages: dependency: transitive description: name: vm_service - sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "14.2.4" + version: "14.2.5" sdks: dart: ">=3.3.0 <4.0.0" flutter: ">=3.18.0-18.0.pre.54" diff --git a/pubspec.lock b/pubspec.lock index eaa7013..65a6519 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -211,10 +211,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "5.0.0" flutter_localizations: dependency: "direct main" description: flutter @@ -279,10 +279,10 @@ packages: dependency: "direct main" description: name: go_router - sha256: ddc16d34b0d74cb313986918c0f0885a7ba2fc24d8fb8419de75f0015144ccfe + sha256: "6f1b756f6e863259a99135ff3c95026c3cdca17d10ebef2bba2261a25ddc8bbc" url: "https://pub.dev" source: hosted - version: "14.2.3" + version: "14.3.0" google_fonts: dependency: "direct main" description: @@ -396,10 +396,10 @@ packages: dependency: transitive description: name: lints - sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" + sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "5.0.0" logging: dependency: transitive description: @@ -1102,5 +1102,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=3.4.0 <4.0.0" + dart: ">=3.5.0 <4.0.0" flutter: ">=3.24.0" diff --git a/pubspec.yaml b/pubspec.yaml index f44361b..017f5e7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -54,7 +54,7 @@ dependencies: path: packages/translations dev_dependencies: - flutter_lints: ^4.0.0 + flutter_lints: ^5.0.0 flutter_test: sdk: flutter integration_test: