diff --git a/lib/main.dart b/lib/main.dart index 218c8d4..ff0f870 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -7,7 +7,6 @@ import 'models/photography_value.dart'; import 'res/theme.dart'; import 'screens/metering/metering_bloc.dart'; import 'screens/metering/metering_screen.dart'; -import 'screens/settings/settings_screen.dart'; import 'utils/stop_type_provider.dart'; void main() { @@ -35,7 +34,7 @@ class MyApp extends StatelessWidget { GlobalCupertinoLocalizations.delegate, ], supportedLocales: S.delegate.supportedLocales, - home: const SettingsScreen(), + home: const MeteringScreen(), ), ), ); diff --git a/lib/screens/metering/metering_screen.dart b/lib/screens/metering/metering_screen.dart index 6046bac..166f8bf 100644 --- a/lib/screens/metering/metering_screen.dart +++ b/lib/screens/metering/metering_screen.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:lightmeter/res/dimens.dart'; import 'package:lightmeter/screens/metering/metering_event.dart'; +import 'package:lightmeter/screens/settings/settings_screen.dart'; import 'components/bottom_controls/bottom_controls.dart'; import 'components/exposure_pairs_list/exposure_pairs_list.dart'; @@ -45,7 +46,7 @@ class MeteringScreen extends StatelessWidget { MeteringBottomControls( onSourceChanged: () {}, onMeasure: () => context.read().add(const MeasureEvent()), - onSettings: () {}, + onSettings: () => Navigator.push(context, MaterialPageRoute(builder: (_) => const SettingsScreen())), ), ], ); diff --git a/lib/screens/settings/components/stop_type_tile.dart b/lib/screens/settings/components/stop_type_tile.dart deleted file mode 100644 index 939af93..0000000 --- a/lib/screens/settings/components/stop_type_tile.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:flutter/material.dart'; - -class StopTypeTile extends StatelessWidget { - const StopTypeTile({super.key}); - - @override - Widget build(BuildContext context) { - return ListTile( - leading: const Icon(Icons.rule), - ); - } -} diff --git a/lib/screens/settings/settings_screen.dart b/lib/screens/settings/settings_screen.dart index 09b7ba8..85bbcd2 100644 --- a/lib/screens/settings/settings_screen.dart +++ b/lib/screens/settings/settings_screen.dart @@ -16,7 +16,7 @@ class SettingsScreen extends StatelessWidget { slivers: [ SliverAppBar( pinned: true, - leading: null, + automaticallyImplyLeading: false, expandedHeight: 160.0, flexibleSpace: FlexibleSpaceBar( centerTitle: false, @@ -28,12 +28,19 @@ class SettingsScreen extends StatelessWidget { ), actions: [ IconButton( - onPressed: () {}, + onPressed: Navigator.of(context).pop, icon: const Icon(Icons.close), ), ], ), - SliverList(delegate: SliverChildListDelegate([CaffeineListTile(), HapticsListTile()])), + SliverList( + delegate: SliverChildListDelegate( + [ + const CaffeineListTile(), + const HapticsListTile(), + ], + ), + ), ], ), );