2022-11-12 21:25:33 +05:30
|
|
|
// ignore_for_file: prefer_const_constructors
|
|
|
|
|
2022-08-10 18:00:28 +05:30
|
|
|
import 'package:flutter/material.dart';
|
2022-08-19 18:34:40 +05:30
|
|
|
import 'package:google_fonts/google_fonts.dart';
|
2024-02-12 02:22:25 +03:00
|
|
|
import 'package:revanced_manager/gen/strings.g.dart';
|
|
|
|
import 'package:revanced_manager/ui/views/settings/settingsFragment/settings_update_language.dart';
|
2023-02-17 18:53:23 +07:00
|
|
|
import 'package:revanced_manager/ui/views/settings/settingsFragment/settings_update_theme.dart';
|
2022-08-10 18:00:28 +05:30
|
|
|
import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart';
|
2022-11-12 21:25:33 +05:30
|
|
|
import 'package:revanced_manager/ui/widgets/settingsView/settings_advanced_section.dart';
|
2024-02-19 20:26:42 +05:45
|
|
|
import 'package:revanced_manager/ui/widgets/settingsView/settings_data_section.dart';
|
2023-10-15 05:56:02 -04:00
|
|
|
import 'package:revanced_manager/ui/widgets/settingsView/settings_debug_section.dart';
|
2022-11-12 21:25:33 +05:30
|
|
|
import 'package:revanced_manager/ui/widgets/settingsView/settings_export_section.dart';
|
|
|
|
import 'package:revanced_manager/ui/widgets/settingsView/settings_team_section.dart';
|
2022-09-02 14:35:25 +01:00
|
|
|
import 'package:revanced_manager/ui/widgets/shared/custom_sliver_app_bar.dart';
|
2022-08-10 18:00:28 +05:30
|
|
|
import 'package:stacked/stacked.dart';
|
|
|
|
|
|
|
|
class SettingsView extends StatelessWidget {
|
2023-11-11 19:07:32 +07:00
|
|
|
const SettingsView({super.key});
|
2022-08-10 18:00:28 +05:30
|
|
|
|
2022-09-19 10:39:25 +02:00
|
|
|
static const _settingsDivider =
|
|
|
|
Divider(thickness: 1.0, indent: 20.0, endIndent: 20.0);
|
|
|
|
|
2022-08-10 18:00:28 +05:30
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return ViewModelBuilder<SettingsViewModel>.reactive(
|
|
|
|
viewModelBuilder: () => SettingsViewModel(),
|
2022-09-12 17:30:44 +01:00
|
|
|
builder: (context, model, child) => Scaffold(
|
2022-08-24 13:22:36 +01:00
|
|
|
body: CustomScrollView(
|
|
|
|
slivers: <Widget>[
|
2022-09-02 14:35:25 +01:00
|
|
|
CustomSliverAppBar(
|
2022-09-19 16:24:31 +01:00
|
|
|
isMainView: true,
|
2024-02-12 02:22:25 +03:00
|
|
|
title: Text(
|
|
|
|
t.settingsView.widgetTitle,
|
|
|
|
style: GoogleFonts.inter(
|
|
|
|
color: Theme.of(context).textTheme.titleLarge!.color,
|
2022-08-24 13:22:36 +01:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
2022-09-19 10:39:25 +02:00
|
|
|
SliverList(
|
|
|
|
delegate: SliverChildListDelegate.fixed(
|
|
|
|
<Widget>[
|
2023-10-15 09:17:28 +00:00
|
|
|
ListView(
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
shrinkWrap: true,
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
children: const [
|
|
|
|
SUpdateThemeUI(),
|
|
|
|
// _settingsDivider,
|
2024-02-12 02:22:25 +03:00
|
|
|
SUpdateLanguageUI(),
|
2023-10-15 09:17:28 +00:00
|
|
|
_settingsDivider,
|
|
|
|
SAdvancedSection(),
|
|
|
|
_settingsDivider,
|
2024-02-19 20:26:42 +05:45
|
|
|
SDataSection(),
|
|
|
|
_settingsDivider,
|
2023-10-15 09:17:28 +00:00
|
|
|
SExportSection(),
|
|
|
|
_settingsDivider,
|
2023-10-15 05:56:02 -04:00
|
|
|
STeamSection(),
|
|
|
|
_settingsDivider,
|
|
|
|
SDebugSection(),
|
2023-10-15 09:17:28 +00:00
|
|
|
],
|
|
|
|
),
|
2022-09-19 10:39:25 +02:00
|
|
|
],
|
2022-08-21 21:16:42 +05:30
|
|
|
),
|
2022-08-10 18:00:28 +05:30
|
|
|
),
|
2022-08-24 13:22:36 +01:00
|
|
|
],
|
2022-08-10 18:00:28 +05:30
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|