feat: dialogs correctly follows Material 3 specifications (#1560)

Signed-off-by: validcube <pun.butrach@gmail.com>
This commit is contained in:
Pun Butrach 2023-12-22 20:34:03 +07:00 committed by GitHub
parent c06d15de5f
commit f8d086a743
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 135 additions and 333 deletions

View file

@ -5,7 +5,6 @@ import 'package:revanced_manager/models/patch.dart';
import 'package:revanced_manager/services/manager_api.dart';
import 'package:revanced_manager/services/toast.dart';
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
import 'package:revanced_manager/ui/widgets/shared/custom_material_button.dart';
// ignore: must_be_immutable
class PatchItem extends StatefulWidget {
@ -216,7 +215,6 @@ class _PatchItemState extends State<PatchItem> {
context: context,
builder: (context) => AlertDialog(
title: I18nText('warning'),
backgroundColor: Theme.of(context).colorScheme.secondaryContainer,
content: I18nText(
'patchItem.unsupportedDialogText',
translationParams: {
@ -226,9 +224,9 @@ class _PatchItemState extends State<PatchItem> {
},
),
actions: <Widget>[
CustomMaterialButton(
label: I18nText('okButton'),
FilledButton(
onPressed: () => Navigator.of(context).pop(),
child: I18nText('okButton'),
),
],
),
@ -240,14 +238,13 @@ class _PatchItemState extends State<PatchItem> {
context: context,
builder: (context) => AlertDialog(
title: I18nText('notice'),
backgroundColor: Theme.of(context).colorScheme.secondaryContainer,
content: I18nText(
'patchItem.unsupportedRequiredOption',
),
actions: <Widget>[
CustomMaterialButton(
label: I18nText('okButton'),
FilledButton(
onPressed: () => Navigator.of(context).pop(),
child: I18nText('okButton'),
),
],
),