mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-25 00:40:39 +00:00
added basic navigation to settings
This commit is contained in:
parent
6dd0a9b192
commit
4696b7d2ee
4 changed files with 13 additions and 18 deletions
|
@ -7,7 +7,6 @@ import 'models/photography_value.dart';
|
|||
import 'res/theme.dart';
|
||||
import 'screens/metering/metering_bloc.dart';
|
||||
import 'screens/metering/metering_screen.dart';
|
||||
import 'screens/settings/settings_screen.dart';
|
||||
import 'utils/stop_type_provider.dart';
|
||||
|
||||
void main() {
|
||||
|
@ -35,7 +34,7 @@ class MyApp extends StatelessWidget {
|
|||
GlobalCupertinoLocalizations.delegate,
|
||||
],
|
||||
supportedLocales: S.delegate.supportedLocales,
|
||||
home: const SettingsScreen(),
|
||||
home: const MeteringScreen(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:lightmeter/res/dimens.dart';
|
||||
import 'package:lightmeter/screens/metering/metering_event.dart';
|
||||
import 'package:lightmeter/screens/settings/settings_screen.dart';
|
||||
|
||||
import 'components/bottom_controls/bottom_controls.dart';
|
||||
import 'components/exposure_pairs_list/exposure_pairs_list.dart';
|
||||
|
@ -45,7 +46,7 @@ class MeteringScreen extends StatelessWidget {
|
|||
MeteringBottomControls(
|
||||
onSourceChanged: () {},
|
||||
onMeasure: () => context.read<MeteringBloc>().add(const MeasureEvent()),
|
||||
onSettings: () {},
|
||||
onSettings: () => Navigator.push(context, MaterialPageRoute(builder: (_) => const SettingsScreen())),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class StopTypeTile extends StatelessWidget {
|
||||
const StopTypeTile({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListTile(
|
||||
leading: const Icon(Icons.rule),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -16,7 +16,7 @@ class SettingsScreen extends StatelessWidget {
|
|||
slivers: <Widget>[
|
||||
SliverAppBar(
|
||||
pinned: true,
|
||||
leading: null,
|
||||
automaticallyImplyLeading: false,
|
||||
expandedHeight: 160.0,
|
||||
flexibleSpace: FlexibleSpaceBar(
|
||||
centerTitle: false,
|
||||
|
@ -28,12 +28,19 @@ class SettingsScreen extends StatelessWidget {
|
|||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
onPressed: () {},
|
||||
onPressed: Navigator.of(context).pop,
|
||||
icon: const Icon(Icons.close),
|
||||
),
|
||||
],
|
||||
),
|
||||
SliverList(delegate: SliverChildListDelegate([CaffeineListTile(), HapticsListTile()])),
|
||||
SliverList(
|
||||
delegate: SliverChildListDelegate(
|
||||
[
|
||||
const CaffeineListTile(),
|
||||
const HapticsListTile(),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue