firebase_dart_ui 0.1.3

  • Readme
  • Changelog
  • Installing
  • 63

firebase_dart_ui #

A dart wrapper for FirebaseUI, a Javascript library that provides sign on flows. This library provides an Angular Dart wrapper around FirebaseUI.

A demonstration application is hosted online here

Usage #

The Angular component <firebase-auth-ui> handles Firebase Authentication for your application.

Add this component to your landing page for your SPA application.The component is visible on the page (display is block ) if the user has not been authenticated. The user is presented a dialog with the various social login and email providers that have been configured in your Firebase console. Once the user has authenticated, the components display attribute is set to none making it invisible.

Important #

You must add these lines to your index.html <head> section:

<script src=""></script>
<script src=""></script>

<script src=""></script>
<link type="text/css" rel="stylesheet" href="" />

The x.y.z versions above are replaced with the current supported versions. Please see the example/ application.

Running the demo #

With DDC:

cd example
webdev serve
# open localhost:8080

To use your our own Firebase project to test, you must edit main.dart and enter in your project credentials. Also edit example/.firebaserc and enter your project name.

To build and deploy the example application #

cd example
webdev build
firebase deploy

Known Issues #

  • The provider implementations need to be fleshed out (phone provider, for example)

Changelog #

0.1.3 #

Merged #8

0.1.0 #

  • Dart 2 support

0.0.3 #

  • Support for siginInSucces callback.
  • Extended sample to demonstrate getting the providers access token

Use this package as a library

1. Depend on it

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

  firebase_dart_ui: ^0.1.3

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or 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:firebase_dart_ui/firebase_dart_ui.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.7.1
  • pana: 0.13.5

Health issues and suggestions

Fix lib/src/auth_ui_js.dart. (-45.42 points)

Analysis of lib/src/auth_ui_js.dart failed with 2 errors, 6 hints, including:

line 28 col 12: Undefined class 'PromiseJsImpl'.

line 56 col 25: Undefined class 'PromiseJsImpl'.

line 9 col 8: Unused import: 'package:firebase/src/interop/firebase_interop.dart'.

line 9 col 66: The library 'package:firebase/src/interop/firebase_interop.dart' doesn't export a member with the shown name 'PromiseJsImpl'.

line 84 col 54: Use = to separate a named parameter from its default value.

Document public APIs. (-0.11 points)

63 out of 65 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/src/firebase_auth_ui_component.dart. (-1.49 points)

Analysis of lib/src/firebase_auth_ui_component.dart reported 3 hints:

line 8 col 15: Avoid const keyword.

line 9 col 14: Avoid const keyword.

line 40 col 17: Unnecessary new keyword.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (firebase).

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and firebase_dart_ui.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
angular ^5.0.0 5.3.1 6.0.0-alpha+1
firebase ^6.0.0 6.0.0 7.2.1
js ^0.6.1+1 0.6.1+1
Transitive dependencies
analyzer 0.35.4 0.39.4
angular_ast 0.5.9 0.5.11
angular_compiler 0.4.3 0.4.5
args 1.5.2
async 2.4.0
build 1.2.2
build_config 0.4.2
built_collection 4.3.2
built_value 7.0.9
charcode 1.1.3
checked_yaml 1.0.2
code_builder 3.2.1
collection 1.14.12
convert 2.1.1
crypto 2.1.4
csslib 0.14.6+1 0.16.1
dart_style 1.2.4 1.3.3
fixnum 0.10.11
front_end 0.1.14 0.1.29
glob 1.2.0
http 0.12.0+4
http_parser 3.1.3
intl 0.15.8 0.16.1
json_annotation 3.0.1
kernel 0.3.14 0.3.29
logging 0.11.4
matcher 0.12.6
meta 1.1.8
node_interop 1.0.3
node_io 1.0.1+2
package_config 1.1.0
path 1.6.4
pedantic 1.9.0
pub_semver 1.4.3
pubspec_parse 0.1.5
quiver 2.1.2+1
source_gen 0.9.4+4 0.9.5
source_span 1.6.0
stack_trace 1.9.3
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
watcher 0.9.7+13
yaml 2.2.0
Dev dependencies
build_runner ^0.10.0
build_web_compilers ^0.4.0