FirebaseService class
Service for managing Firebase CLI operations such as login, project creation, and SHA registration.
This service provides an abstraction over common Firebase CLI commands and handles complex multi-account switching logic.
Constructors
- FirebaseService()
- Default constructor for FirebaseService.
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
-
configure(
String projectId) → Future< void> -
Configures FlutterFire for the current project using the
provided
projectId. -
createProject(
String id) → Future< void> -
Creates a new Firebase project with the given
id. -
disableFeature(
String feature) → Future< void> - Provides warnings and manual instructions for disabling features that cannot be easily undone via the CLI.
-
enableFeature(
String feature) → Future< void> - Provides helpful CLI instructions for enabling specific Firebase features such as 'auth', 'firestore', or 'fcm'.
-
getAndroidAppId(
String projectId) → Future< String?> -
Retrieves the Android App ID (also known as the App Index)
from the specified Firebase
projectId. -
getProjectIdFromFirebaseJson(
) → Future< String?> -
Attempts to parse the
firebase.jsonfile to identify the linked Firebase project ID. -
getShas(
) → Future< Map< String, String> > - Fetches the SHA-1 and SHA-256 fingerprints for the Android project.
-
listProjects(
) → Future< void> - Lists all Firebase projects associated with the currently authenticated account.
-
login(
) → Future< void> - Ensures the user is logged into Firebase and prompts for account selection if multiple accounts are available.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setupSha(
String projectId) → Future< void> -
Orchestrates the full SHA setup flow for the specified
projectId. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited