flutter_auth_ui 2.0.0 flutter_auth_ui: ^2.0.0 copied to clipboard
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.
flutter_auth_ui #
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's native plugin.
Check documents and setup your firebase project.
- iOS : https://firebase.google.com/docs/auth/ios/firebaseui
- Android : https://firebase.google.com/docs/auth/android/firebaseui
How to use #
// Set provider
final providers = [
AuthUiItem.AuthAnonymous,
AuthUiItem.AuthEmail,
AuthUiItem.AuthPhone,
AuthUiItem.AuthApple,
AuthUiItem.AuthFacebook,
AuthUiItem.AuthGithub,
AuthUiItem.AuthGoogle,
AuthUiItem.AuthMicrosoft,
AuthUiItem.AuthYahoo,
AuthUiItem.AuthTwitter,
];
final result = await FlutterAuthUi.startUi(
items: providers,
tosAndPrivacyPolicy: TosAndPrivacyPolicy(
tosUrl: "https://www.google.com",
privacyPolicyUrl: "https://www.google.com",
),
androidOption: AndroidOption(
enableSmartLock: false, // default true
),
emailAuthOption: EmailAuthOption(
requireDisplayName: true, // default true
enableMailLink: false, // default false
handleURL: '',
androidPackageName: '',
androidMinimumVersion: '',
),
);
Requirements #
- flutter 1.22.0 or higher
- firebase_auth 1.0.0
Android #
- minSdkVersion 21
- compileSdkVersion 30
iOS #
- iOS 12 or higher
Tips #
To change the title of AppBar on Android #
Add the string value as app_name
or fui_default_toolbar_title
to your app's strings.xml
file.
Sample code is strings.xml.
If you want to customize the color of AppBar, change colorPrimary
and colorPrimaryDark
. See colors.xml.
Behavior depends on FirebaseUI-Android.