m3_lightmeter/lib/screens/settings/screen_settings.dart

62 lines
2 KiB
Dart
Raw Normal View History

2022-10-30 18:23:06 +00:00
import 'package:flutter/material.dart';
2022-10-30 18:59:33 +00:00
import 'package:lightmeter/generated/l10n.dart';
import 'package:lightmeter/res/dimens.dart';
2023-02-19 16:19:56 +00:00
import 'components/about/widget_settings_section_about.dart';
2023-02-19 16:55:12 +00:00
import 'components/equipment/widget_settings_section_equipment.dart';
2023-02-19 16:19:56 +00:00
import 'components/general/widget_settings_section_general.dart';
import 'components/metering/widget_settings_section_metering.dart';
import 'components/theme/widget_settings_section_theme.dart';
2022-10-30 18:23:06 +00:00
class SettingsScreen extends StatelessWidget {
const SettingsScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
2022-12-17 18:05:50 +00:00
body: SafeArea(
top: false,
bottom: false,
2022-12-17 18:05:50 +00:00
child: CustomScrollView(
slivers: <Widget>[
SliverAppBar(
pinned: true,
automaticallyImplyLeading: false,
expandedHeight: Dimens.grid168,
flexibleSpace: FlexibleSpaceBar(
centerTitle: false,
titlePadding: const EdgeInsets.all(Dimens.paddingM),
title: Text(
S.of(context).settings,
2023-01-26 15:03:48 +00:00
style: TextStyle(
color: Theme.of(context).colorScheme.onSurface,
fontSize: 24,
),
2022-12-17 18:05:50 +00:00
),
2022-10-30 18:59:33 +00:00
),
2022-12-17 18:05:50 +00:00
actions: [
IconButton(
onPressed: Navigator.of(context).pop,
icon: const Icon(Icons.close),
),
],
2022-10-30 18:59:33 +00:00
),
2022-12-17 18:05:50 +00:00
SliverList(
delegate: SliverChildListDelegate(
<Widget>[
2023-02-19 16:19:56 +00:00
const MeteringSettingsSection(),
2023-02-19 16:55:12 +00:00
const EquipmentSettingsSection(),
2023-02-19 16:19:56 +00:00
const GeneralSettingsSection(),
const ThemeSettingsSection(),
const AboutSettingsSection(),
SizedBox(height: MediaQuery.of(context).padding.bottom),
2022-12-17 18:05:50 +00:00
],
),
),
],
),
2022-10-30 18:23:06 +00:00
),
);
}
}