From 2e03108f5425f2ee0b83cfce443496898efb6d88 Mon Sep 17 00:00:00 2001 From: Krille Date: Fri, 7 Jul 2023 12:10:07 +0900 Subject: [PATCH] design: Adjust open url dialog design a little bit --- lib/utils/url_launcher.dart | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/utils/url_launcher.dart b/lib/utils/url_launcher.dart index 61fa582d2..988002800 100644 --- a/lib/utils/url_launcher.dart +++ b/lib/utils/url_launcher.dart @@ -38,22 +38,20 @@ class UrlLauncher { ); return; } - final consent = await showConfirmationDialog( + final consent = await showModalActionSheet<_LaunchUrlResponse>( context: context, - title: L10n.of(context)!.openLinkInBrowser, - message: url, + title: url, + style: AdaptiveStyle.material, actions: [ - AlertDialogAction( - key: null, - label: L10n.of(context)!.cancel, - ), - AlertDialogAction( + SheetAction( key: _LaunchUrlResponse.copy, + icon: Icons.copy_outlined, label: L10n.of(context)!.copy, ), - AlertDialogAction( + SheetAction( key: _LaunchUrlResponse.launch, - label: L10n.of(context)!.ok, + icon: Icons.launch_outlined, + label: L10n.of(context)!.openLinkInBrowser, ), ], );