firebase_auth_vm 0.0.2

  • Readme
  • Changelog
  • Installing
  • 54

Firebase Auth Dart SDK - CLI example app #

Install #

All needed dependencies are provided by the [PlatformDependencies]. The current implementation uses hive to store the current user and his tokens.

class Dependencies extends PlatformDependencies {
  Dependencies({@required}) : headersBuilder = null;

  final Box<dynamic> box;

  final HeaderBuilder headersBuilder;

  InternalTokenProvider get authProvider => null;

  AuthUrlPresenter get authUrlPresenter => null;

  bool get isBackground => false;

  Future<bool> get isNetworkConnected => Future<bool>.value(true);

  String get locale => 'en';

  Stream<bool> get isBackgroundChanged => Stream<bool>.fromIterable(<bool>[false]);

Initialize #

You just need to initialize you're FirebaseApp then you are ready to go.

  final Box<dynamic> firebaseBox =
      await Hive.openBox<dynamic>('firebase_auth', encryptionKey: _hiveEncryptionKey.codeUnits);
  final Dependencies dependencies = Dependencies(box: firebaseBox);
  final FirebaseOptions options = FirebaseOptions(apiKey: _apiKey, applicationId: 'appId');
  FirebaseApp.withOptions(options, dependencies);

After this you can use FirebaseAuth.instance for the default Firebase App or FirebaseAuth.getInstance(FirebaseApp app) for a specify Firebase App.

##Disclaimer This is still under heavy development and it still has some roughs edges. Please make sure to open an issue or a pull request if you found something. Thanks :D

0.0.2 #

  • Add flutter example app

0.0.1 #

  • Initial release

Use this package as a library

1. Depend on it

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

  firebase_auth_vm: ^0.0.2

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_auth_vm/firebase_auth_vm.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 May 24, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.1
  • pana: 0.13.8-dev

Health suggestions

Fix lib/src/firebase_auth.dart. (-0.50 points)

Analysis of lib/src/firebase_auth.dart reported 1 hint:

line 68 col 28: The value of the field '_backgroundChangedSub' isn't used.

Fix lib/src/util/api_key_client.dart. (-0.50 points)

Analysis of lib/src/util/api_key_client.dart reported 1 hint:

line 109 col 23: The value of the local variable 'codeValue' isn't used.

Maintenance issues and suggestions

Support latest dependencies. (-30 points)

The version constraint in pubspec.yaml does not support the latest published versions for 3 dependencies (_discoveryapis_commons, googleapis, rxdart).

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

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

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

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_auth_vm.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.7.0 <3.0.0
_discoveryapis_commons ^0.1.9 0.1.9 0.2.0
_firebase_internal_vm ^0.0.2 0.0.2
built_collection ^4.3.2 4.3.2
built_value ^7.0.9 7.1.0
firebase_core_vm ^0.0.4 0.0.4
googleapis ^0.54.0 0.54.0 0.55.0
googleapis_auth ^0.2.11+1 0.2.11+1
http ^0.12.0+4 0.12.1
meta ^1.1.8 1.1.8
rxdart ^0.23.1 0.23.1 0.24.1
Transitive dependencies
charcode 1.1.3
collection 1.14.12
convert 2.1.1
crypto 2.1.5
fixnum 0.10.11
http_parser 3.1.4
matcher 0.12.6
path 1.7.0
pedantic 1.9.0
quiver 2.1.3
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
Dev dependencies
build_runner ^1.7.4
built_value_generator ^7.0.9
test ^1.12.0