mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-23 16:00:41 +00:00
c66381f813
* sync with resources * separated `ExpandableSectionList` as widget * fixed generic type * implemented `FilmsScreen` (wip) * made `SliverScreen` title a widget * [`FilmEditScreen`] wip * [`FilmEditScreen`] added validation * fixed title overflow for `SliverScreen` * [`FilmEditScreen`] separated add and edit blocs * [`FilmEditScreen`] split into separate components * added bottom widget to `SliverScreen` * implemented films list tabs fo `FilmsScreen` * added films screen to navigation * replaced explicit routes names with enum values * implemented CRUD for custom films * added placeholder for empty custom films list * added `FilmsStorageService` * fixed unit tests * fixed integration tests * lint * fixed golden tests * added iap stub methods * added custom films to features list * use 2.0.0 resouces * fixed film picket tests * migrated to iap 1.0.1 * autofocus film name field * wait for the film to edited * migrated to iap 1.1.0 * typo * wait for storage initialization * migrated to iap 1.1.1 * fixed films initialization * added conditions to films model `updateShouldNotifyDependent` * typo * fixed select film discard notify * covered films model `updateShouldNotifyDependent`
55 lines
2 KiB
Dart
55 lines
2 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/lightmeter_pro/widget_settings_section_lightmeter_pro.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';
|
|
import 'package:lightmeter/utils/context_utils.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: Text(S.of(context).settings),
|
|
slivers: [
|
|
SliverList(
|
|
delegate: SliverChildListDelegate(
|
|
<Widget>[
|
|
if (!context.isPro) const LightmeterProSettingsSection(),
|
|
const MeteringSettingsSection(),
|
|
const GeneralSettingsSection(),
|
|
const ThemeSettingsSection(),
|
|
const AboutSettingsSection(),
|
|
SizedBox(height: MediaQuery.of(context).padding.bottom),
|
|
],
|
|
),
|
|
),
|
|
SliverToBoxAdapter(child: SizedBox(height: MediaQuery.paddingOf(context).bottom)),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|