flutter_auth_ui 0.2.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 78

flutter_auth_ui #

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

Getting Started #

This plugin is wrapped Android/iOS's native plugin.

Check documents and setup your firebase project.

How to use #

// Set provider
final providers = [
  AuthUiItem.AuthEmail,
  AuthUiItem.AuthApple,
  AuthUiItem.AuthGithub,
  AuthUiItem.AuthGoogle,
  AuthUiItem.AuthMicrosoft,
  AuthUiItem.AuthYahoo,
];

final tosAndPrivacyPolicy = TosAndPrivacyPolicy(Terms of Service URL, Privacy Policy URL);
final isSuccess = await FlutterAuthUi.startUi(providers, tosAndPrivacyPolicy);

0.2.0 #

Second beta release.

Breaking change #

  • Change set provider function to enum
  • Change PlatformUser to Bool when success startUi

Minor change #

  • Update libs
  • Update api doc

0.1.0 #

First beta release of flutter plugin for Firebase Auth UI.

  • Modify return value of startUi
  • Change setEmail method
  • Add api doc

0.0.1 #

Initial alpha release of flutter plugin for Firebase Auth UI.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_auth_ui/flutter_auth_ui.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Column(
            children: [
              RaisedButton(
                  child: const Text("start ui"),
                  onPressed: () async {
                    final providers = [
                      AuthUiItem.AuthEmail,
                      AuthUiItem.AuthApple,
                      AuthUiItem.AuthGithub,
                      AuthUiItem.AuthGoogle,
                      AuthUiItem.AuthMicrosoft,
                      AuthUiItem.AuthYahoo,
                    ];
                    final tosAndPrivacyPolicy = TosAndPrivacyPolicy(
                        "https://www.google.com", "https://www.google.com");

                    final result = await FlutterAuthUi.startUi(
                        providers, tosAndPrivacyPolicy);
                    print(result);
                  }),
            ],
          ),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_auth_ui: ^0.2.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_auth_ui/flutter_auth_ui.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
55
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
78
Learn more about scoring.

We analyzed this package on Mar 31, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
firebase_auth ^0.15.4 0.15.5+3
flutter 0.0.0
flutter_plugin_android_lifecycle ^1.0.6 1.0.6
Transitive dependencies
async 2.4.1
charcode 1.1.3
collection 1.14.11 1.14.12
firebase 7.2.1
firebase_auth_platform_interface 1.1.7
firebase_auth_web 0.1.2
firebase_core 0.4.4+3
firebase_core_platform_interface 1.0.4
firebase_core_web 0.1.1+2
flutter_web_plugins 0.0.0
http 0.12.0+4
http_parser 3.1.4
js 0.6.1+1
matcher 0.12.6
meta 1.1.8
path 1.6.4
pedantic 1.9.0
plugin_platform_interface 1.0.2
quiver 2.1.3
sky_engine 0.0.99
source_span 1.7.0
stack_trace 1.9.3
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test