mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-25 23:14:18 +03:00
Use transparent barrier for FsDialogs.
This commit is contained in:
parent
9f3cf07253
commit
9648a1396c
@ -32,10 +32,12 @@ Future<T?> showBlurDialog<T>({
|
|||||||
required BuildContext context,
|
required BuildContext context,
|
||||||
required Widget Function(BuildContext) builder,
|
required Widget Function(BuildContext) builder,
|
||||||
RouteSettings? routeSettings,
|
RouteSettings? routeSettings,
|
||||||
|
Color barrierColor = const Color(0x80000000),
|
||||||
}) async =>
|
}) async =>
|
||||||
await showGeneralDialog<T>(
|
await showGeneralDialog<T>(
|
||||||
context: context,
|
context: context,
|
||||||
barrierDismissible: true,
|
barrierDismissible: true,
|
||||||
|
barrierColor: barrierColor,
|
||||||
barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel,
|
barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel,
|
||||||
pageBuilder: (ctx, anim1, anim2) => builder(ctx),
|
pageBuilder: (ctx, anim1, anim2) => builder(ctx),
|
||||||
transitionDuration: const Duration(milliseconds: 150),
|
transitionDuration: const Duration(milliseconds: 150),
|
||||||
|
@ -224,7 +224,11 @@ class AppPage extends StatelessWidget {
|
|||||||
child: IconButton(
|
child: IconButton(
|
||||||
key: actionsIconButtonKey,
|
key: actionsIconButtonKey,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
showBlurDialog(context: context, builder: keyActionsBuilder!);
|
showBlurDialog(
|
||||||
|
context: context,
|
||||||
|
barrierColor: Colors.transparent,
|
||||||
|
builder: keyActionsBuilder!,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
icon: keyActionsBadge
|
icon: keyActionsBadge
|
||||||
? const Badge(
|
? const Badge(
|
||||||
|
@ -26,7 +26,8 @@ class FsDialog extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final l10n = AppLocalizations.of(context)!;
|
final l10n = AppLocalizations.of(context)!;
|
||||||
return Dialog.fullscreen(
|
return Dialog.fullscreen(
|
||||||
backgroundColor: Theme.of(context).colorScheme.background.withAlpha(100),
|
backgroundColor:
|
||||||
|
Theme.of(context).colorScheme.background.withOpacity(0.7),
|
||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
@ -59,6 +59,7 @@ class FidoUnlockedPage extends ConsumerWidget {
|
|||||||
OpenIntent: CallbackAction<OpenIntent>(
|
OpenIntent: CallbackAction<OpenIntent>(
|
||||||
onInvoke: (_) => showBlurDialog(
|
onInvoke: (_) => showBlurDialog(
|
||||||
context: context,
|
context: context,
|
||||||
|
barrierColor: Colors.transparent,
|
||||||
builder: (context) => CredentialDialog(cred),
|
builder: (context) => CredentialDialog(cred),
|
||||||
)),
|
)),
|
||||||
DeleteIntent: CallbackAction<DeleteIntent>(
|
DeleteIntent: CallbackAction<DeleteIntent>(
|
||||||
@ -91,6 +92,7 @@ class FidoUnlockedPage extends ConsumerWidget {
|
|||||||
OpenIntent: CallbackAction<OpenIntent>(
|
OpenIntent: CallbackAction<OpenIntent>(
|
||||||
onInvoke: (_) => showBlurDialog(
|
onInvoke: (_) => showBlurDialog(
|
||||||
context: context,
|
context: context,
|
||||||
|
barrierColor: Colors.transparent,
|
||||||
builder: (context) => FingerprintDialog(fp),
|
builder: (context) => FingerprintDialog(fp),
|
||||||
)),
|
)),
|
||||||
EditIntent: CallbackAction<EditIntent>(
|
EditIntent: CallbackAction<EditIntent>(
|
||||||
|
@ -89,6 +89,7 @@ class _AccountViewState extends ConsumerState<AccountView> {
|
|||||||
OpenIntent: CallbackAction<OpenIntent>(onInvoke: (_) async {
|
OpenIntent: CallbackAction<OpenIntent>(onInvoke: (_) async {
|
||||||
await showBlurDialog(
|
await showBlurDialog(
|
||||||
context: context,
|
context: context,
|
||||||
|
barrierColor: Colors.transparent,
|
||||||
builder: (context) => AccountDialog(credential),
|
builder: (context) => AccountDialog(credential),
|
||||||
);
|
);
|
||||||
return null;
|
return null;
|
||||||
|
@ -70,6 +70,7 @@ class PivScreen extends ConsumerWidget {
|
|||||||
CallbackAction<OpenIntent>(onInvoke: (_) async {
|
CallbackAction<OpenIntent>(onInvoke: (_) async {
|
||||||
await showBlurDialog(
|
await showBlurDialog(
|
||||||
context: context,
|
context: context,
|
||||||
|
barrierColor: Colors.transparent,
|
||||||
builder: (context) => SlotDialog(e.slot),
|
builder: (context) => SlotDialog(e.slot),
|
||||||
);
|
);
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user