[all plugins] All plugins should have a static instance
member, and a static instanceFor()
method if arguments are allowed
#1377
Labels
type: enhancement
New feature or request
This is a breaking change that we'd like to land as part of our push towards stabilizing the Flutterfire API and authoring integration tests that work across web and mobile (see #40).
Currently the Flutterfire plugins are inconsistent about how you get an instance of the plugin. Some, like firebase_analytics, offer only an anonymous constructor: FirebaseAnalytics(). Others have a static final
instance
member. Some, like cloud_firestore, have both. The anonymous constructor sometimes takes additional arguments, as in the case of firebase_storage.The following change is proposed:
FirebaseXXX.instance
member that uses the default Firebase app.FirebaseXXX.instanceFor()
factory constructor should be provided.The text was updated successfully, but these errors were encountered: