From 8697bcfec7435c76c816c8669f32e3bdc9cbb8d3 Mon Sep 17 00:00:00 2001 From: Vadim <44135514+vodemn@users.noreply.github.com> Date: Sun, 27 Nov 2022 23:31:49 +0300 Subject: [PATCH] wip --- android/app/build.gradle | 2 +- lib/main.dart | 7 ++++++- .../permissions_check/screen_permissions_check.dart | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 253d7bc..d12a49a 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion flutter.compileSdkVersion + compileSdkVersion 33 ndkVersion flutter.ndkVersion compileOptions { diff --git a/lib/main.dart b/lib/main.dart index ed3afcd..3a2ad6e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -4,6 +4,7 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:lightmeter/data/permissions_service.dart'; import 'package:lightmeter/screens/settings/settings_page_route_builder.dart'; +import 'package:lightmeter/screens/settings/settings_screen.dart'; import 'package:provider/provider.dart'; import 'generated/l10n.dart'; @@ -11,6 +12,7 @@ import 'models/photography_value.dart'; import 'res/dimens.dart'; import 'res/theme.dart'; import 'screens/metering/metering_bloc.dart'; +import 'screens/metering/metering_screen.dart'; import 'screens/permissions_check/flow_permissions_check.dart'; import 'utils/stop_type_provider.dart'; @@ -78,7 +80,10 @@ class _ApplicationState extends State with TickerProviderStateMixin ], supportedLocales: S.delegate.supportedLocales, home: const PermissionsCheckFlow(), - //home: MeteringScreen(animationController: _animationController), + routes: { + "metering": (context) => MeteringScreen(animationController: _animationController), + "settings": (context) => const SettingsScreen(), + }, ), ), ), diff --git a/lib/screens/permissions_check/screen_permissions_check.dart b/lib/screens/permissions_check/screen_permissions_check.dart index f3cff07..61fac5f 100644 --- a/lib/screens/permissions_check/screen_permissions_check.dart +++ b/lib/screens/permissions_check/screen_permissions_check.dart @@ -21,7 +21,7 @@ class PermissionsCheckScreen extends StatelessWidget { child: BlocConsumer( listener: (context, state) { if (state is PermissionsGrantedState) { - Navigator.of(context).pushReplacement(MaterialPageRoute(builder: (_) => SettingsScreen())); + Navigator.of(context).pushReplacementNamed("metering"); } }, builder: (context, state) {