revanced-manager/lib/ui/views/settings/settings_view.dart

70 lines
2.5 KiB
Dart
Raw Normal View History

// 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';
import 'package:google_fonts/google_fonts.dart';
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';
import 'package:revanced_manager/ui/widgets/settingsView/settings_advanced_section.dart';
import 'package:revanced_manager/ui/widgets/settingsView/settings_debug_section.dart';
import 'package:revanced_manager/ui/widgets/settingsView/settings_export_section.dart';
import 'package:revanced_manager/ui/widgets/settingsView/settings_team_section.dart';
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
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(),
builder: (context, model, child) => Scaffold(
body: CustomScrollView(
slivers: <Widget>[
CustomSliverAppBar(
isMainView: true,
title: I18nText(
'settingsView.widgetTitle',
child: Text(
'',
style: GoogleFonts.inter(
color: Theme.of(context).textTheme.titleLarge!.color,
2022-08-20 14:17:00 +02:00
),
),
),
),
SliverList(
delegate: SliverChildListDelegate.fixed(
<Widget>[
ListView(
padding: EdgeInsets.zero,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
children: const [
SUpdateThemeUI(),
// _settingsDivider,
// SUpdateLanguageUI(),
_settingsDivider,
SAdvancedSection(),
_settingsDivider,
SExportSection(),
_settingsDivider,
STeamSection(),
_settingsDivider,
SDebugSection(),
],
),
],
),
2022-08-10 14:30:28 +02:00
),
],
2022-08-10 14:30:28 +02:00
),
),
);
}
}