2022-08-21 20:04:01 +02:00
|
|
|
import 'dart:io';
|
|
|
|
|
2022-08-16 01:53:30 +02:00
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
2022-08-13 22:51:09 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
2022-08-20 23:19:40 +02:00
|
|
|
import 'package:immich_mobile/modules/settings/ui/asset_list_settings/asset_list_settings.dart';
|
2022-08-13 22:51:09 +02:00
|
|
|
import 'package:immich_mobile/modules/settings/ui/image_viewer_quality_setting/image_viewer_quality_setting.dart';
|
2022-08-21 18:29:24 +02:00
|
|
|
import 'package:immich_mobile/modules/settings/ui/notification_setting/notification_setting.dart';
|
2022-08-16 01:53:30 +02:00
|
|
|
import 'package:immich_mobile/modules/settings/ui/theme_setting/theme_setting.dart';
|
2022-08-13 22:51:09 +02:00
|
|
|
|
|
|
|
class SettingsPage extends HookConsumerWidget {
|
|
|
|
const SettingsPage({Key? key}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
|
|
return Scaffold(
|
|
|
|
appBar: AppBar(
|
|
|
|
leading: IconButton(
|
|
|
|
iconSize: 20,
|
|
|
|
splashRadius: 24,
|
|
|
|
onPressed: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
|
|
|
icon: const Icon(Icons.arrow_back_ios_new_rounded),
|
|
|
|
),
|
|
|
|
automaticallyImplyLeading: false,
|
|
|
|
centerTitle: false,
|
|
|
|
title: const Text(
|
2022-08-16 01:53:30 +02:00
|
|
|
'setting_pages_app_bar_settings',
|
2022-08-13 22:51:09 +02:00
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 16,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
),
|
2022-08-16 01:53:30 +02:00
|
|
|
).tr(),
|
2022-08-13 22:51:09 +02:00
|
|
|
),
|
|
|
|
body: ListView(
|
|
|
|
children: [
|
|
|
|
...ListTile.divideTiles(
|
|
|
|
context: context,
|
|
|
|
tiles: [
|
|
|
|
const ImageViewerQualitySetting(),
|
2022-08-16 01:53:30 +02:00
|
|
|
const ThemeSetting(),
|
2022-08-21 18:29:24 +02:00
|
|
|
const AssetListSettings(),
|
2022-08-21 20:04:01 +02:00
|
|
|
if (Platform.isAndroid) const NotificationSetting(),
|
2022-10-01 10:33:06 +02:00
|
|
|
//const ExperimentalSettings(),
|
2022-08-13 22:51:09 +02:00
|
|
|
],
|
|
|
|
).toList(),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|