This commit is contained in:
Vadim 2022-11-27 23:31:49 +03:00
parent 7460f12211
commit 8697bcfec7
3 changed files with 8 additions and 3 deletions

View file

@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion flutter.compileSdkVersion compileSdkVersion 33
ndkVersion flutter.ndkVersion ndkVersion flutter.ndkVersion
compileOptions { compileOptions {

View file

@ -4,6 +4,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:lightmeter/data/permissions_service.dart'; import 'package:lightmeter/data/permissions_service.dart';
import 'package:lightmeter/screens/settings/settings_page_route_builder.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 'package:provider/provider.dart';
import 'generated/l10n.dart'; import 'generated/l10n.dart';
@ -11,6 +12,7 @@ import 'models/photography_value.dart';
import 'res/dimens.dart'; import 'res/dimens.dart';
import 'res/theme.dart'; import 'res/theme.dart';
import 'screens/metering/metering_bloc.dart'; import 'screens/metering/metering_bloc.dart';
import 'screens/metering/metering_screen.dart';
import 'screens/permissions_check/flow_permissions_check.dart'; import 'screens/permissions_check/flow_permissions_check.dart';
import 'utils/stop_type_provider.dart'; import 'utils/stop_type_provider.dart';
@ -78,7 +80,10 @@ class _ApplicationState extends State<Application> with TickerProviderStateMixin
], ],
supportedLocales: S.delegate.supportedLocales, supportedLocales: S.delegate.supportedLocales,
home: const PermissionsCheckFlow(), home: const PermissionsCheckFlow(),
//home: MeteringScreen(animationController: _animationController), routes: {
"metering": (context) => MeteringScreen(animationController: _animationController),
"settings": (context) => const SettingsScreen(),
},
), ),
), ),
), ),

View file

@ -21,7 +21,7 @@ class PermissionsCheckScreen extends StatelessWidget {
child: BlocConsumer<PermissionsCheckBloc, PermissionsCheckState>( child: BlocConsumer<PermissionsCheckBloc, PermissionsCheckState>(
listener: (context, state) { listener: (context, state) {
if (state is PermissionsGrantedState) { if (state is PermissionsGrantedState) {
Navigator.of(context).pushReplacement(MaterialPageRoute(builder: (_) => SettingsScreen())); Navigator.of(context).pushReplacementNamed("metering");
} }
}, },
builder: (context, state) { builder: (context, state) {