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-01-21 10:37:49 +00:00
|
|
|
import 'components/haptics/provider_list_tile_haptics.dart';
|
2022-12-18 09:03:41 +00:00
|
|
|
import 'components/widget_list_tile_fractional_stops.dart';
|
2023-01-22 19:17:44 +00:00
|
|
|
import 'components/theme/widget_settings_theme.dart';
|
2022-12-18 09:03:41 +00:00
|
|
|
import 'components/widget_label_version.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,
|
|
|
|
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,
|
|
|
|
style: TextStyle(color: Theme.of(context).colorScheme.onSurface, fontSize: 24),
|
|
|
|
),
|
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(
|
|
|
|
[
|
|
|
|
const StopTypeListTile(),
|
2023-01-21 10:37:49 +00:00
|
|
|
const HapticsListTileProvider(),
|
2023-01-22 19:17:44 +00:00
|
|
|
const ThemeSettings(),
|
2022-12-17 18:05:50 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SliverFillRemaining(
|
|
|
|
hasScrollBody: false,
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
children: const [VersionLabel()],
|
2022-10-30 18:23:06 +00:00
|
|
|
),
|
2022-10-30 19:07:39 +00:00
|
|
|
),
|
2022-12-17 18:05:50 +00:00
|
|
|
],
|
|
|
|
),
|
2022-10-30 18:23:06 +00:00
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|