mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 15:30:59 +00:00
5adcee00dd
* Added `ServiceProviders` widget * Added `EnumProviders` widget for enum values * Moved `ThemeProvider` functionality to `EnumProviders` * Style * `EnumProviders` -> `UserPreferencesProvider` * `ServiceProviders` -> `ServiceProvider` * Moved `MeteringScreenLayoutProvider` functionality to `UserPreferencesProvider` * typo * Removed `InheritedModelAspectListener` * TODO * Removed Inherited Generics * Removed redundant `LightmeterProviders` * Removed redundant methods from `ServicesProvider` * `_inheritFrom` -> `_inheritFromEnumsModel` * Fixed `MeteringScreenLayoutConfig` updates * Separated `_ThemeModel` * typo * `_EnumsModel` -> `_UserPreferencesModel`
57 lines
1.9 KiB
Dart
57 lines
1.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:lightmeter/generated/l10n.dart';
|
|
import 'package:lightmeter/screens/settings/components/about/widget_settings_section_about.dart';
|
|
import 'package:lightmeter/screens/settings/components/general/widget_settings_section_general.dart';
|
|
import 'package:lightmeter/screens/settings/components/metering/widget_settings_section_metering.dart';
|
|
import 'package:lightmeter/screens/settings/components/theme/widget_settings_section_theme.dart';
|
|
import 'package:lightmeter/screens/settings/flow_settings.dart';
|
|
import 'package:lightmeter/screens/shared/sliver_screen/screen_sliver.dart';
|
|
|
|
class SettingsScreen extends StatefulWidget {
|
|
const SettingsScreen({super.key});
|
|
|
|
@override
|
|
State<SettingsScreen> createState() => _SettingsScreenState();
|
|
}
|
|
|
|
class _SettingsScreenState extends State<SettingsScreen> {
|
|
@override
|
|
void didChangeDependencies() {
|
|
super.didChangeDependencies();
|
|
SettingsInteractorProvider.of(context).disableVolumeHandling();
|
|
}
|
|
|
|
@override
|
|
void deactivate() {
|
|
SettingsInteractorProvider.of(context).restoreVolumeHandling();
|
|
super.deactivate();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ScaffoldMessenger(
|
|
child: SliverScreen(
|
|
title: S.of(context).settings,
|
|
appBarActions: [
|
|
IconButton(
|
|
onPressed: Navigator.of(context).pop,
|
|
icon: const Icon(Icons.close),
|
|
),
|
|
],
|
|
slivers: [
|
|
SliverList(
|
|
delegate: SliverChildListDelegate(
|
|
<Widget>[
|
|
const MeteringSettingsSection(),
|
|
const GeneralSettingsSection(),
|
|
const ThemeSettingsSection(),
|
|
const AboutSettingsSection(),
|
|
SizedBox(height: MediaQuery.of(context).padding.bottom),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|