firebase_app_dart 0.2.2
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
AuthTokenChangeis a signal. An empty token means signed out; a token that is not empty may be a placeholder, so callers take the token fromAuthTokenProvider.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.appandFirebase.apps;FirebaseApp.getInstanceandFirebaseApp.appsare removed.defaultFirebaseAppName.FirebaseOptionsuses FlutterFire's field names (appId,messagingSenderId,databaseURL,trackingId) and accepts its other fields, so a generated options file compiles;copyWith.FirebaseException(plugin, code, message) implementsExceptionand replacesFirebaseError; the unused Android error classes are removed.delete,setAutomaticDataCollectionEnabledandsetAutomaticResourceManagementEnabledreturn futures and take the value positionally;isAutomaticDataCollectionEnabled.- The token provider interfaces are
AuthTokenProvider,AuthTokenChangeandAppCheckTokenProvider. - Fix:
FirebaseOptions.toJsonandfromJsonkeepdataCollectionEnabled.
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
LICENSEandNOTICE).firebase_core_vmwas licensed under BSD-3-Clause. firebase_core_vmis nowfirebase_app_dart: importpackage:firebase_app_dart/firebase_app_dart.dartinstead ofpackage:firebase_core_vm/firebase_core_vm.dart. Class names (FirebaseApp,FirebaseOptions,PlatformDependencies, ...) are unchanged._firebase_internal_vmis folded into this package. Its utilities are reachable throughpackage:firebase_app_dart/internal.dart, which exists forcloud_firestore_dartand is not public API.- Migration guide: docs/migrating_from_vm_packages.md.
Breaking changes #
- Dart 3.8 (
sdk: ^3.8.0, the floor ofcloud_firestore_dartand the lowest SDK the CI runs) with sound null safety.FirebaseOptions.projectId,databaseUrl,storageBucket,gcmSenderIdandgaTrackingIdare nullable;apiKeyandapplicationIdare required. FirebaseApp.setDataCollectionDefaultEnabledtakes a required namedenabled.FirebaseApp.persistenceKeyuses 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()andInternalTokenResult.toString()no longer contain the token (or, forGetTokenResult, the claims); they print<redacted>.FirebaseApp.withOptionsthrows anArgumentErrorfor options with an empty application id in every build; the check was anassertof theconstFirebaseOptionsconstructor only.
Added #
PlatformDependencies.appCheckProvider(InternalAppCheckTokenProvider,AppCheckTokenResult), used bycloud_firestore_dartto send the App Check header.FirebaseOptionsequality andFirebaseOptions.fromJson.- Experimental web support:
FirebaseApp.withOptionsno longer throwsUnimplementedErroron the web, so thatcloud_firestore_dartcan 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 docruns without warnings.
Fixed #
FirebaseApp.deleteremoves the app by name.GetTokenResulttolerates tokens with missing claims.
Versions published as firebase_core_vm #
0.0.4 #
- Expose
isWeb,isMobileandisDesktopbased on conditional imports - Throw unimplemented error when trying to create a FirebaseApp in a js/html context
0.0.3 #
- Rename library from
firebase_commontofirebase_core
0.0.2 #
- Add flutter example
- Update README
0.0.1 #
- Initial release