From b506b6132bcd0957f8114796d59dd119e89c8683 Mon Sep 17 00:00:00 2001 From: Vadim <44135514+vodemn@users.noreply.github.com> Date: Sun, 29 Jan 2023 19:55:44 +0300 Subject: [PATCH] cleanup --- lib/application.dart | 11 ++--------- lib/screens/metering/screen_metering.dart | 1 - 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/application.dart b/lib/application.dart index fb55463..583fc18 100644 --- a/lib/application.dart +++ b/lib/application.dart @@ -19,18 +19,11 @@ import 'screens/metering/flow_metering.dart'; import 'screens/settings/flow_settings.dart'; import 'utils/stop_type_provider.dart'; -final RouteObserver routeObserver = RouteObserver(); - -class Application extends StatefulWidget { +class Application extends StatelessWidget { final Environment env; const Application(this.env, {super.key}); - @override - State createState() => _ApplicationState(); -} - -class _ApplicationState extends State { @override Widget build(BuildContext context) { return FutureBuilder( @@ -42,7 +35,7 @@ class _ApplicationState extends State { if (snapshot.data != null) { return MultiProvider( providers: [ - Provider.value(value: widget.env.copyWith(hasLightSensor: snapshot.data![1] as bool)), + Provider.value(value: env.copyWith(hasLightSensor: snapshot.data![1] as bool)), Provider(create: (_) => UserPreferencesService(snapshot.data![0] as SharedPreferences)), Provider(create: (_) => const HapticsService()), Provider(create: (_) => PermissionsService()), diff --git a/lib/screens/metering/screen_metering.dart b/lib/screens/metering/screen_metering.dart index 868dcf6..2dba320 100644 --- a/lib/screens/metering/screen_metering.dart +++ b/lib/screens/metering/screen_metering.dart @@ -4,7 +4,6 @@ import 'package:lightmeter/data/models/ev_source_type.dart'; import 'package:lightmeter/data/models/photography_values/photography_value.dart'; import 'package:lightmeter/environment.dart'; import 'package:lightmeter/providers/ev_source_type_provider.dart'; -import 'package:lightmeter/res/dimens.dart'; import 'components/bottom_controls/widget_bottom_controls.dart'; import 'components/camera_container/provider_container_camera.dart';