mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-06-12 12:47:37 +02:00
feat(style): use native switch & chip (#732)
* chore: remove useless themedata * feat(style): new switch * feat(style): use native chip components * chore: remove unused import * feat(accessibility): set tooltip * chore: remove unneeded themedata * chore: fix theme * feat(i18n): add 3 new strings * feat(style): correct material 3 theme on nondynamic
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_i18n/widgets/I18nText.dart';
|
||||
import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart';
|
||||
import 'package:revanced_manager/ui/widgets/settingsView/custom_switch_tile.dart';
|
||||
|
||||
class SExperimentalPatches extends StatefulWidget {
|
||||
const SExperimentalPatches({super.key});
|
||||
@ -15,8 +14,8 @@ final _settingsViewModel = SettingsViewModel();
|
||||
class _SExperimentalPatchesState extends State<SExperimentalPatches> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CustomSwitchTile(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20.0),
|
||||
return SwitchListTile(
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 20.0),
|
||||
title: I18nText(
|
||||
'settingsView.experimentalPatchesLabel',
|
||||
child: const Text(
|
||||
@ -29,7 +28,7 @@ class _SExperimentalPatchesState extends State<SExperimentalPatches> {
|
||||
),
|
||||
subtitle: I18nText('settingsView.experimentalPatchesHint'),
|
||||
value: _settingsViewModel.areExperimentalPatchesEnabled(),
|
||||
onTap: (value) {
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_settingsViewModel.useExperimentalPatches(value);
|
||||
});
|
||||
|
@ -1,7 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_i18n/widgets/I18nText.dart';
|
||||
import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart';
|
||||
import 'package:revanced_manager/ui/widgets/settingsView/custom_switch_tile.dart';
|
||||
|
||||
class SExperimentalUniversalPatches extends StatefulWidget {
|
||||
const SExperimentalUniversalPatches({super.key});
|
||||
@ -17,8 +16,8 @@ class _SExperimentalUniversalPatchesState
|
||||
extends State<SExperimentalUniversalPatches> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CustomSwitchTile(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20.0),
|
||||
return SwitchListTile(
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 20.0),
|
||||
title: I18nText(
|
||||
'settingsView.experimentalUniversalPatchesLabel',
|
||||
child: const Text(
|
||||
@ -31,7 +30,7 @@ class _SExperimentalUniversalPatchesState
|
||||
),
|
||||
subtitle: I18nText('settingsView.experimentalUniversalPatchesHint'),
|
||||
value: _settingsViewModel.areUniversalPatchesEnabled(),
|
||||
onTap: (value) {
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_settingsViewModel.showUniversalPatches(value);
|
||||
});
|
||||
|
Reference in New Issue
Block a user