FirebaseOptionsSelector class
Main class for persisting a Firebase environment in SharedPreferences
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
availableOptions
→ Map<
String, FirebaseOptions> -
Map environment names to
FirebaseOptions
no setter - isProduction → bool
-
Check if we are using the production environment
no setter
- selectedKey → String
-
Name of current environment
no setter
Static Methods
-
getCurrentSelection(
) → Future< String> -
Get the current selection from
SharedPreferences
-
initialize(
String productionKey, Map< String, FirebaseOptions> availableOptions) → Future<void> -
Read environment selection from
SharedPreferences
and runFirebase.initializeApp
with the selectedFirebaseOptions
-
materialAppBuilder(
BuildContext context, Widget? child) → Widget - Shortcut to use FirebaseOptionsBanner as the builder for MaterialApp
-
select(
String newValue) → Future< void> - Select a different environment for the next time the app starts