Skip to main content

firebase_app_dart 0.2.2 copy "firebase_app_dart: ^0.2.2" to clipboard
firebase_app_dart: ^0.2.2 copied to clipboard

Unofficial pure-Dart FirebaseApp and FirebaseOptions for Dart servers, CLIs and Flutter apps. The app layer used by cloud_firestore_dart.

0.2.2 #

  • Documentation: an AuthTokenChange is a signal. An empty token means signed out; a token that is not empty may be a placeholder, so callers take the token from AuthTokenProvider.getAccessToken. No change in behaviour.

0.2.1 #

  • GetTokenResult.signInSecondFactor: the second factor of the sign-in (firebase.sign_in_second_factor), or null.

0.2.0 #

Breaking: the API takes the names and shapes of FlutterFire's firebase_core. Every change is in docs/api_migration_0_2.md.

  • Firebase.initializeApp, Firebase.app and Firebase.apps; FirebaseApp.getInstance and FirebaseApp.apps are removed. defaultFirebaseAppName.
  • FirebaseOptions uses FlutterFire's field names (appId, messagingSenderId, databaseURL, trackingId) and accepts its other fields, so a generated options file compiles; copyWith.
  • FirebaseException (plugin, code, message) implements Exception and replaces FirebaseError; the unused Android error classes are removed.
  • delete, setAutomaticDataCollectionEnabled and setAutomaticResourceManagementEnabled return futures and take the value positionally; isAutomaticDataCollectionEnabled.
  • The token provider interfaces are AuthTokenProvider, AuthTokenChange and AppCheckTokenProvider.
  • Fix: FirebaseOptions.toJson and fromJson keep dataCollectionEnabled.

0.1.1 #

Documentation and examples only. No code change.

  • Doc comments with compiling samples across the public API.
  • A rewritten README, and one example per task in example/: default and named apps, options from JSON, platform dependencies and app deletion.

0.1.0 #

First release under the new name. This package continues firebase_core_vm 0.0.4 (March 2020), the version cloud_firestore_vm 0.0.7 depends on; it is the same code base, revived as part of the Firestore port. firebase_core_vm 0.0.5 to 0.0.8 on pub.dev (August and September 2020) were published from another branch, and this package does not continue from them. Verified with its unit tests and through cloud_firestore_dart's emulator suite; against production Firebase it was only used by the verification kit of cloud_firestore_dart, on one Firestore database.

Renamed package #

  • License: Apache-2.0 (see LICENSE and NOTICE). firebase_core_vm was licensed under BSD-3-Clause.
  • firebase_core_vm is now firebase_app_dart: import package:firebase_app_dart/firebase_app_dart.dart instead of package:firebase_core_vm/firebase_core_vm.dart. Class names (FirebaseApp, FirebaseOptions, PlatformDependencies, ...) are unchanged.
  • _firebase_internal_vm is folded into this package. Its utilities are reachable through package:firebase_app_dart/internal.dart, which exists for cloud_firestore_dart and is not public API.
  • Migration guide: docs/migrating_from_vm_packages.md.

Breaking changes #

  • Dart 3.8 (sdk: ^3.8.0, the floor of cloud_firestore_dart and the lowest SDK the CI runs) with sound null safety. FirebaseOptions.projectId, databaseUrl, storageBucket, gcmSenderId and gaTrackingId are nullable; apiKey and applicationId are required.
  • FirebaseApp.setDataCollectionDefaultEnabled takes a required named enabled.
  • FirebaseApp.persistenceKey uses URL-safe base64 without padding; keys computed by older versions differ.
  • The Flutter example app is replaced by a command-line example/main.dart.
  • GetTokenResult.toString() and InternalTokenResult.toString() no longer contain the token (or, for GetTokenResult, the claims); they print <redacted>.
  • FirebaseApp.withOptions throws an ArgumentError for options with an empty application id in every build; the check was an assert of the const FirebaseOptions constructor only.

Added #

  • PlatformDependencies.appCheckProvider (InternalAppCheckTokenProvider, AppCheckTokenResult), used by cloud_firestore_dart to send the App Check header.
  • FirebaseOptions equality and FirebaseOptions.fromJson.
  • Experimental web support: FirebaseApp.withOptions no longer throws UnimplementedError on the web, so that cloud_firestore_dart can run there. Only creating an app and using it with Firestore was tried in a browser (Chrome).
  • Every exported class and member has a doc comment; dart doc runs without warnings.

Fixed #

  • FirebaseApp.delete removes the app by name.
  • GetTokenResult tolerates tokens with missing claims.

Versions published as firebase_core_vm #

0.0.4 #

  • Expose isWeb, isMobile and isDesktop based on conditional imports
  • Throw unimplemented error when trying to create a FirebaseApp in a js/html context

0.0.3 #

  • Rename library from firebase_common to firebase_core

0.0.2 #

  • Add flutter example
  • Update README

0.0.1 #

  • Initial release
0
likes
160
points
474
downloads

Documentation

API reference

Publisher

verified publisherupcode.dev

Weekly Downloads

Unofficial pure-Dart FirebaseApp and FirebaseOptions for Dart servers, CLIs and Flutter apps. The app layer used by cloud_firestore_dart.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#firebase #firestore #dart #server

License

Apache-2.0 (license)

Dependencies

collection, meta, rxdart

More

Packages that depend on firebase_app_dart