-
-
Notifications
You must be signed in to change notification settings - Fork 726
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
134 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
lib/ui/widgets/settingsView/settings_use_prerelease_patches.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:revanced_manager/gen/strings.g.dart'; | ||
import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart'; | ||
import 'package:revanced_manager/ui/widgets/shared/haptics/haptic_switch_list_tile.dart'; | ||
|
||
class SUsePrereleasePatches extends StatefulWidget { | ||
const SUsePrereleasePatches({super.key}); | ||
|
||
@override | ||
State<SUsePrereleasePatches> createState() => _SUsePrereleasePatchesState(); | ||
} | ||
|
||
final _settingsViewModel = SettingsViewModel(); | ||
|
||
class _SUsePrereleasePatchesState extends State<SUsePrereleasePatches> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return HapticSwitchListTile( | ||
contentPadding: const EdgeInsets.symmetric(horizontal: 20.0), | ||
title: Text( | ||
t.settingsView.usePrereleasePatchesLabel, | ||
style: const TextStyle( | ||
fontSize: 20, | ||
fontWeight: FontWeight.w500, | ||
), | ||
), | ||
subtitle: Text(t.settingsView.usePrereleasePatchesHint), | ||
value: _settingsViewModel.isUsingPrereleasePatches(), | ||
onChanged: (value) async { | ||
await _settingsViewModel.showUsePrelereasePatchesDialog(context, value); | ||
setState(() {}); | ||
}, | ||
); | ||
} | ||
} |