flutter_firebase_ui 0.0.12

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 85

flutter_firebase_ui

Build Status pub package

Flutter_firebase_ui is a library that help you to quickly implement firebase authentication. It provider UI for the common identity providers, Facebook, Google, Twitter and email.

Note: this plugin use firebase_auth you must configure it as describe here.

screenshot

Show firebase ui example.

Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

[0.0.12] - 27/09/2018

  • after trouble sign in pop

[0.0.11] - 27/09/2018

  • add function signOutProviders

[0.0.10] - 26/09/2018

  • fixed empty null on Providers
  • allow for usage with landscape orientation

[0.0.9] - 07/09/2018

  • add mail verification option

[0.0.8] - 17/07/2018

  • improve UI

[0.0.7] - 04/07/2018

  • fixe sign in with mail

[0.0.6] - 30/05/2018

  • improve show dialog error

[0.0.5] - 29/05/2018

  • show error occured on unknown errors
  • display email if no displayName (example)
  • secure providers test, firebase_auth behavior change
  • pop sign up !

[0.0.4] - 09/05/2018

  • Upgrade to Google Services 3.2.1 and Google Sign In 3.0.3

[0.0.3] - 23/03/2018

  • dart 2 fix

[0.0.2] - 20/03/2018

  • improve ui
  • change firebase_auth version

[0.0.1] - 19/03/2018

  • initial release

example/lib/main.dart

import 'dart:async';

import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:flutter_firebase_ui/flutter_firebase_ui.dart';
import 'package:flutter_firebase_ui/l10n/localization.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Flutter Demo',
      theme: new ThemeData(
        primarySwatch: Colors.blue,
      ),
      localizationsDelegates: [
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
        FFULocalizations.delegate,
      ],
      supportedLocales: [
        const Locale('fr', 'FR'),
        const Locale('en', 'US'),
        const Locale('de', 'DE'),
      ],
      home: new MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => new _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final FirebaseAuth _auth = FirebaseAuth.instance;
  StreamSubscription<FirebaseUser> _listener;

  FirebaseUser _currentUser;

  @override
  void initState() {
    super.initState();
    _checkCurrentUser();
  }

  @override
  void dispose() {
    _listener.cancel();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    if (_currentUser == null) {
      return new SignInScreen(
        title: "Bienvenue",
        header: new Padding(
          padding: const EdgeInsets.symmetric(vertical: 16.0),
          child: new Padding(
            padding: const EdgeInsets.all(16.0),
            child: new Text("Demo"),
          ),
        ),
        providers: [
          ProvidersTypes.google,
          ProvidersTypes.facebook,
          ProvidersTypes.email
        ],
      );
    } else {
      return new HomeScreen(user: _currentUser);
    }
  }

  void _checkCurrentUser() async {
    _currentUser = await _auth.currentUser();
    _currentUser?.getIdToken(refresh: true);

    _listener = _auth.onAuthStateChanged.listen((FirebaseUser user) {
      setState(() {
        _currentUser = user;
      });
    });
  }
}

class HomeScreen extends StatelessWidget {
  final FirebaseUser user;

  HomeScreen({this.user});

  @override
  Widget build(BuildContext context) => new Scaffold(
      appBar: new AppBar(
        title: new Text("Bienvenue"),
        elevation: 4.0,
      ),
      body: new Container(
          padding: const EdgeInsets.all(16.0),
          decoration: new BoxDecoration(color: Colors.amber),
          child: new Column(
            crossAxisAlignment: CrossAxisAlignment.center,
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              new Row(
                mainAxisAlignment: MainAxisAlignment.center,
                children: <Widget>[
                  new Text("Welcome,"),
                ],
              ),
              new SizedBox(
                height: 8.0,
              ),
              new Text(user.displayName ?? user.email),
              new SizedBox(
                height: 32.0,
              ),
              new RaisedButton(
                  child: new Text("DECONNEXION"), onPressed: _logout)
            ],
          )));

  void _logout() {
    signOutProviders();
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_firebase_ui: ^0.0.12

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_firebase_ui/flutter_firebase_ui.dart';
  
Version Uploaded Documentation Archive
0.0.12 Oct 15, 2018 Go to the documentation of flutter_firebase_ui 0.0.12 Download flutter_firebase_ui 0.0.12 archive
0.0.11 Sep 27, 2018 Go to the documentation of flutter_firebase_ui 0.0.11 Download flutter_firebase_ui 0.0.11 archive
0.0.10 Sep 26, 2018 Go to the documentation of flutter_firebase_ui 0.0.10 Download flutter_firebase_ui 0.0.10 archive
0.0.9 Sep 7, 2018 Go to the documentation of flutter_firebase_ui 0.0.9 Download flutter_firebase_ui 0.0.9 archive
0.0.8 Jul 17, 2018 Go to the documentation of flutter_firebase_ui 0.0.8 Download flutter_firebase_ui 0.0.8 archive
0.0.7 Jul 4, 2018 Go to the documentation of flutter_firebase_ui 0.0.7 Download flutter_firebase_ui 0.0.7 archive
0.0.6 May 30, 2018 Go to the documentation of flutter_firebase_ui 0.0.6 Download flutter_firebase_ui 0.0.6 archive
0.0.5 May 29, 2018 Go to the documentation of flutter_firebase_ui 0.0.5 Download flutter_firebase_ui 0.0.5 archive
0.0.4 May 9, 2018 Go to the documentation of flutter_firebase_ui 0.0.4 Download flutter_firebase_ui 0.0.4 archive
0.0.3 May 9, 2018 Go to the documentation of flutter_firebase_ui 0.0.3 Download flutter_firebase_ui 0.0.3 archive

All 11 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
87
Health:
Code health derived from static analysis. [more]
91
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
85
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7
  • Flutter: 1.0.0

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs (-9.40 points)

109 out of 116 API elements (library, class, field or method) have no adequate dartdoc content. Good documentation improves code readability and discoverability through search.

Maintenance suggestions

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Package is pre-v0.1 release. (-10 points)

While there is nothing inherently wrong with versions of 0.0.*, it usually means that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0 <3.0.0
firebase_auth ^0.5.7 0.5.20 0.6.6
flutter 0.0.0
flutter_facebook_login ^1.1.1 1.1.1
google_sign_in ^3.0.3+1 3.2.4
Transitive dependencies
collection 1.14.11
meta 1.1.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test