Skip to content

🐛 [firebase_ui_auth] AlertDialog unclickable in iOS/macOS if used with MaterialApp() - eg delete account #567

@large

Description

@large

Is there an existing issue for this?

  • I have searched the existing issues and found no duplicates.

What plugin is this bug for?

Firebase UI Auth

What platform(s) does this bug affect?

iOS / macOS

List of dependencies used.

flutter pub deps -s list
  Not relevant

Steps to reproduce

Wrap your ProfileScreen() in a MaterialApp() and see this popup on iOS/macOS:

Image

This is unclickable because of the AlertDialog parameters given adaptiveAction() function:

Widget buildMaterial(BuildContext context) {
return AlertDialog(
title: Text(title),
content: Text(message),
actions: [
adaptiveAction(
context: context,
onPressed: onConfirm,
child: Text(confirmButtonText),
isDestructiveAction: true,
),
adaptiveAction(
context: context,
onPressed: onCancel,
child: Text(cancelButtonText),
),
],
);
}

Expected Behavior

Expected that AlertDialog() should be clickable if you decide to use MaterialApp() for iOS/macOS.
Wrap the ProfileScreen() in CupertinoApp() and everything works fine. And looks like this:

Image

Reason for it working as expected is because of these parameters:

case TargetPlatform.iOS:
case TargetPlatform.macOS:
return CupertinoDialogAction(
onPressed: onPressed,
isDestructiveAction: isDestructiveAction,
child: child,
);
}

Actual Behavior

Forces the developer to use CupertinoApp() for iOS/macOS and MaterialApp() on other devices if you want to use the UI-package.

Additional Information

It could be fixed by adding the adaptive handling by AlertDialog() here:

Replace with:

return AlertDialog.adaptive(

But I have seen other PRs removing this feature earlier, so I did not want to push a new PR for "fixing" this.
If it suppose to force developers to use CupertinoApp() for iOS/macOS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs AttentionOP created or responded to issue and it needs attention.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions