Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A Flutter plugin for using the Firebase Auth UI with Dart in Flutter apps. (not official plugin.)

License

NotificationsYou must be signed in to change notification settings

koji-1009/flutter_auth_ui

Repository files navigation

Unofficial firebaseui package for flutter. This library aims to provide support for Android, iOS and the web. Login with Email, Phone, Google account and etc.

Getting Started

This plugin is wrapped Android/iOS/Web native plugin.

Check documents and setup your firebase project.

How to use

// Set providerfinal providers= [AuthUiProvider.anonymous,AuthUiProvider.email,AuthUiProvider.phone,AuthUiProvider.apple,AuthUiProvider.facebook,AuthUiProvider.github,AuthUiProvider.google,AuthUiProvider.microsoft,AuthUiProvider.yahoo,AuthUiProvider.twitter,];final result=awaitFlutterAuthUi.startUi(  items: providers,  tosAndPrivacyPolicy:constTosAndPrivacyPolicy(    tosUrl:"https://www.google.com",    privacyPolicyUrl:"https://www.google.com",  ),  androidOption:constAndroidOption(    enableSmartLock:false,// default true    showLogo:true,// default false    overrideTheme:true,// default false  ),  emailAuthOption:constEmailAuthOption(    requireDisplayName:true,// default true    enableMailLink:false,// default false    handleURL:'',    androidPackageName:'',    androidMinimumVersion:'',  ),);

Requirements

Android

  • minSdkVersion 21
  • compileSdkVersion 34

iOS

  • iOS 13 or higher

Link

Tips

EmailLink

Note: In order to implement EmailLink, you will need to prepare in advance; check thefirebase documentation first.

Let's check the code sample for firebase auth.

Android

To handle dynamic link, addFlutterAuthUiPlugin.catchEmailLink toonCreate andonNewIntent.(If you don't use EmailLink, then you don't need to add it.)

importandroid.content.Intent;importandroid.os.Bundle;importandroidx.annotation.NonNull;importandroidx.annotation.Nullable;importcom.dr1009.app.flutter_auth_ui.FlutterAuthUiPlugin;importio.flutter.embedding.android.FlutterActivity;publicclassMainActivityextendsFlutterActivity {@OverrideprotectedvoidonCreate(@NullableBundlesavedInstanceState) {super.onCreate(savedInstanceState);// check intentFlutterAuthUiPlugin.catchEmailLink(this,getIntent());    }@OverrideprotectedvoidonNewIntent(@NonNullIntentintent) {super.onNewIntent(intent);// check intentFlutterAuthUiPlugin.catchEmailLink(this,intent);    }}

Localizing

Android

Supported without any special settings.

iOS

CheckLocalizing for iOS: Updating the iOS app bundle.

Web

CheckInstallation - Option 1: CDN - Localized Widget.

To change the title of AppBar on Android

Add the string value asapp_name orfui_default_toolbar_title to your app'sstrings.xml file.Sample code isstrings.xml.

Behavior depends onFirebaseUI-Android.

Show Logo (Android)

  1. Add your logo resource file toandroid/app/src/main/res/drawable/flutter_auth_ui_logo.xml orandroid/app/src/main/res/drawable-{m~xxxhdpi}/flutter_auth_ui_logo.png
  2. EnableAndroidOption.showLogo

Change Appbar and link color (Android)

  1. Addflutter_auth_ui_style style to yourandroid/app/src/main/res/values/style.xml
  1. EnableAndroidOption.overrideTheme

About

A Flutter plugin for using the Firebase Auth UI with Dart in Flutter apps. (not official plugin.)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp