fix: remove ugly AlertDialog animation

This commit is contained in:
Alberto Ponces
2022-09-02 00:10:41 +01:00
parent 7723bb717c
commit 65e2814b99

View File

@ -135,33 +135,28 @@ class _PatchItemState extends State<PatchItem> {
} }
Future<void> _showUnsupportedWarningDialog() { Future<void> _showUnsupportedWarningDialog() {
return showGeneralDialog( return showDialog(
context: context, context: context,
pageBuilder: (ctx, a1, a2) => Container(), builder: (context) => AlertDialog(
transitionBuilder: (ctx, a1, a2, child) => Transform.scale( title: I18nText('patchItem.alertDialogTitle'),
scale: Curves.easeInOut.transform(a1.value), content: I18nText(
child: AlertDialog( 'patchItem.alertDialogText',
title: I18nText('patchItem.alertDialogTitle'), translationParams: {
content: I18nText( 'packageVersion': widget.packageVersion,
'patchItem.alertDialogText', 'supportedVersions':
translationParams: { '\u2022 ${widget.supportedPackageVersions.join('\n\u2022 ')}',
'packageVersion': widget.packageVersion, },
'supportedVersions':
'\u2022 ${widget.supportedPackageVersions.join('\n\u2022 ')}',
},
),
actions: [
PatchTextButton(
text: FlutterI18n.translate(context, 'okButton'),
onPressed: () => Navigator.of(context).pop(),
backgroundColor: Theme.of(context).colorScheme.secondary,
borderColor: Theme.of(context).colorScheme.secondary,
)
],
backgroundColor: Theme.of(context).colorScheme.surface,
), ),
actions: [
PatchTextButton(
text: FlutterI18n.translate(context, 'okButton'),
onPressed: () => Navigator.of(context).pop(),
backgroundColor: Theme.of(context).colorScheme.secondary,
borderColor: Theme.of(context).colorScheme.secondary,
)
],
backgroundColor: Theme.of(context).colorScheme.surface,
), ),
transitionDuration: const Duration(milliseconds: 400),
); );
} }
} }