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';
|
|
|
|
|
|
|
|
import 'components/caffeine_tile.dart';
|
|
|
|
import 'components/haptics_tile.dart';
|
2022-12-11 14:04:08 +00:00
|
|
|
import 'components/fractional_stops/list_tile_fractional_stops.dart';
|
2022-10-30 18:23:06 +00:00
|
|
|
|
|
|
|
class SettingsScreen extends StatelessWidget {
|
|
|
|
const SettingsScreen({super.key});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: Theme.of(context).colorScheme.surface,
|
|
|
|
body: CustomScrollView(
|
|
|
|
slivers: <Widget>[
|
|
|
|
SliverAppBar(
|
|
|
|
pinned: true,
|
2022-10-30 19:07:39 +00:00
|
|
|
automaticallyImplyLeading: false,
|
2022-11-27 20:22:56 +00:00
|
|
|
expandedHeight: Dimens.grid168,
|
2022-10-30 18:59:33 +00:00
|
|
|
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:23:06 +00:00
|
|
|
actions: [
|
|
|
|
IconButton(
|
2022-10-30 19:07:39 +00:00
|
|
|
onPressed: Navigator.of(context).pop,
|
2022-10-30 18:23:06 +00:00
|
|
|
icon: const Icon(Icons.close),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
2022-10-30 19:07:39 +00:00
|
|
|
SliverList(
|
|
|
|
delegate: SliverChildListDelegate(
|
|
|
|
[
|
2022-12-11 14:04:08 +00:00
|
|
|
const FractionalStopsListTile(),
|
2022-10-30 19:07:39 +00:00
|
|
|
const CaffeineListTile(),
|
|
|
|
const HapticsListTile(),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
2022-10-30 18:23:06 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|