faui 1.0.9

  • Readme
  • Changelog
  • Example
  • Installing
  • 81

flutter-auth-ui (faui) #

faui is an authentication UI for Flutter. It registers users with email and password using Firebase security as a service ( SECaaS ). The library provides UI to register user, validate email, sign in, sign out and restore password. Also it supports silent sign in.

faui is regularly tested for Web by polina-c.

If you regularly test the library for one of the platforms, say this here, please.

Demo

Pub package

Demo source code

Package source code

Getting Started #

Create Project in Firebase #

To test the library use demo project.

apiKey: "AIzaSyA3hshWKqeogfYiklVCCtDaWJW8TfgWgB4"

Then you will want to create your project:

  1. Sign in to firebase console https://console.firebase.google.com/
  2. Add, configure and open project
  3. In the project open tab "Authentication" and then tab "Sign-in Method"
  4. Click "Email/Password", set "Enable" and click "Save"
  5. Select "Project Settings" (gear icon)
  6. Copy your "Web API Key"

Set Dependency #

  1. Update pubspec.yaml to make sure your project references necessary packages:
dependencies:
  ...
  faui: <latest version>

Check <latest version> here.

Update Code #

In the beginning of the method build of the widget that requires authentication (it should be stateful), add the code:

if (faui.User == null) {
  return faui.BuildAuthScreen(
    onExit: this.setState((){...}),
    firebaseApiKey: "...",
  );
}

Import:

import 'package:faui/faui.dart';

Get user email:

faui.User.email

Sign out:

faui.signOut()

Silent sign-in:


// Before runApp:
WidgetsFlutterBinding.ensureInitialized();
await faui.trySignInSilently(firebaseApiKey: '...');
...

// After sign in with dialog:
faui.saveUserLocallyForSilentSignIn();

[0.0.1] - Sep 15, 2019

  • Initial release.

[1.0.1] - Sep 15, 2019

  • Fixed package format.

[1.0.2] - Sep 15, 2019

  • Fixed package format.

[1.0.3] - Sep 15, 2019

  • Fixed package format.

[1.0.4] - Sep 16, 2019

  • Fixed package format.

[1.0.5] - Sep 16, 2019

  • Updated documentation.

[1.0.6] - Sep 16, 2019

  • Updated documentation.

[1.0.8] - Oct 16, 2019

  • Fixed bug with tab stop
  • Documented API

[1.0.9] - Oct 16, 2019

  • Updated link to demo

example/readme.md

flutter-auth-ui-demo #

This is demo app for flutter-auth-ui.

Demo is hosted here.

Use this package as a library

1. Depend on it

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


dependencies:
  faui: ^1.0.9

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:faui/faui.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
61
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]
81
Learn more about scoring.

We analyzed this package on Oct 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.0 <3.0.0
crypted_preferences ^0.0.2 0.0.2
flutter 0.0.0
http ^0.12.0+2 0.12.0+2
uuid ^2.0.1 2.0.2
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.11 1.14.12
convert 2.1.1
crypto 2.1.3
http_parser 3.1.3
meta 1.1.7
path 1.6.4
pedantic 1.8.0+1
sky_engine 0.0.99
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
test any