showDifferentMethodSignInDialog function

  1. @Deprecated('Email enumeration protection is on by default.' 'Read more here https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection')
Future<void> showDifferentMethodSignInDialog({
  1. required BuildContext context,
  2. required List<String> availableProviders,
  3. required List<AuthProvider<AuthListener, AuthCredential>> providers,
  4. FirebaseAuth? auth,
  5. VoidCallback? onSignedIn,
})

Implementation

@Deprecated(
  'Email enumeration protection is on by default.'
  'Read more here https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection',
)
Future<void> showDifferentMethodSignInDialog({
  required BuildContext context,

  /// A list of providers associated with the user account
  required List<String> availableProviders,

  /// A list of all supported providers
  required List<AuthProvider> providers,

  /// {@macro ui.auth.auth_controller.auth}
  fba.FirebaseAuth? auth,

  /// A callback that is being called after user has successfully signed in.
  VoidCallback? onSignedIn,
}) async {
  final l = FirebaseUILocalizations.labelsOf(context);

  await showGeneralDialog(
    context: context,
    barrierDismissible: true,
    barrierLabel: l.cancelButtonLabel,
    pageBuilder: (context, _, __) => DifferentMethodSignInDialog(
      availableProviders: availableProviders,
      providers: providers,
      auth: auth,
      onSignedIn: () {
        Navigator.of(context).pop();
      },
    ),
  );
}