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, {List< String> ? platforms, String? env}) → Future<void> -
Configures FlutterFire for the current project using the
provided
projectId. -
createProject(
String id, {String? displayName}) → Future< void> -
detectAndroidPackageName(
) → String? -
Configures FlutterFire for the current project using the
provided
projectId. -
detectIosBundleId(
) → String? -
Detects the default iOS bundle identifier from
ios/Runner.xcodeproj/project.pbxproj. -
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< List< String> > - Lists all Firebase projects associated with the currently authenticated account and returns their IDs.
-
login(
) → Future< String?> - 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
-
projectExists(
String id) → Future< bool> -
Checks if a project with the given
idalready exists. -
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