2022-11-12 16:55:33 +01:00
|
|
|
// ignore_for_file: prefer_const_constructors
|
|
|
|
|
2022-08-10 14:30:28 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_i18n/flutter_i18n.dart';
|
2022-08-19 15:04:40 +02:00
|
|
|
import 'package:google_fonts/google_fonts.dart';
|
2023-02-17 12:53:23 +01:00
|
|
|
import 'package:revanced_manager/ui/views/settings/settingsFragment/settings_update_theme.dart';
|
2022-08-10 14:30:28 +02:00
|
|
|
import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart';
|
2022-11-12 16:55:33 +01:00
|
|
|
import 'package:revanced_manager/ui/widgets/settingsView/settings_advanced_section.dart';
|
|
|
|
import 'package:revanced_manager/ui/widgets/settingsView/settings_export_section.dart';
|
|
|
|
import 'package:revanced_manager/ui/widgets/settingsView/settings_info_section.dart';
|
|
|
|
import 'package:revanced_manager/ui/widgets/settingsView/settings_team_section.dart';
|
2022-09-02 15:35:25 +02:00
|
|
|
import 'package:revanced_manager/ui/widgets/shared/custom_sliver_app_bar.dart';
|
2022-08-10 14:30:28 +02:00
|
|
|
import 'package:stacked/stacked.dart';
|
|
|
|
|
|
|
|
class SettingsView extends StatelessWidget {
|
2022-09-07 03:37:25 +02:00
|
|
|
const SettingsView({Key? key}) : super(key: key);
|
2022-08-10 14:30:28 +02:00
|
|
|
|
2022-09-19 10:39:25 +02:00
|
|
|
static const _settingsDivider =
|
|
|
|
Divider(thickness: 1.0, indent: 20.0, endIndent: 20.0);
|
|
|
|
|
2022-08-10 14:30:28 +02:00
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return ViewModelBuilder<SettingsViewModel>.reactive(
|
|
|
|
viewModelBuilder: () => SettingsViewModel(),
|
2022-09-12 18:30:44 +02:00
|
|
|
builder: (context, model, child) => Scaffold(
|
2022-08-24 14:22:36 +02:00
|
|
|
body: CustomScrollView(
|
|
|
|
slivers: <Widget>[
|
2022-09-02 15:35:25 +02:00
|
|
|
CustomSliverAppBar(
|
2022-09-19 17:24:31 +02:00
|
|
|
isMainView: true,
|
2022-09-02 15:35:25 +02:00
|
|
|
title: I18nText(
|
|
|
|
'settingsView.widgetTitle',
|
|
|
|
child: Text(
|
|
|
|
'',
|
|
|
|
style: GoogleFonts.inter(
|
2023-02-19 04:16:49 +01:00
|
|
|
color: Theme.of(context).textTheme.titleLarge!.color,
|
2022-08-20 14:17:00 +02:00
|
|
|
),
|
2022-08-24 14:22:36 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
2022-09-19 10:39:25 +02:00
|
|
|
SliverList(
|
|
|
|
delegate: SliverChildListDelegate.fixed(
|
|
|
|
<Widget>[
|
2022-11-12 16:55:33 +01:00
|
|
|
SUpdateThemeUI(),
|
2022-11-29 13:15:42 +01:00
|
|
|
// SUpdateLanguageUI(),
|
|
|
|
// _settingsDivider,
|
2022-11-12 16:55:33 +01:00
|
|
|
STeamSection(),
|
2022-09-19 10:39:25 +02:00
|
|
|
_settingsDivider,
|
2022-11-12 16:55:33 +01:00
|
|
|
SAdvancedSection(),
|
2022-11-09 09:50:32 +01:00
|
|
|
_settingsDivider,
|
2022-11-12 16:55:33 +01:00
|
|
|
SExportSection(),
|
2022-09-20 00:31:21 +02:00
|
|
|
_settingsDivider,
|
2022-11-12 16:55:33 +01:00
|
|
|
SInfoSection(),
|
2022-09-19 10:39:25 +02:00
|
|
|
],
|
2022-08-21 17:46:42 +02:00
|
|
|
),
|
2022-08-10 14:30:28 +02:00
|
|
|
),
|
2022-08-24 14:22:36 +02:00
|
|
|
],
|
2022-08-10 14:30:28 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|