FirebaseBillingService class

Detect Spark vs Blaze on a Firebase / GCP project and guide the user through upgrading when necessary.

This service intentionally never blocks: every public call gracefully degrades to BlazeStatus.unknown when the underlying tooling fails, letting the orchestrator decide whether to skip Blaze-only steps.

Constructors

FirebaseBillingService(String projectId, {ProcessRunner? runner})

Properties

hashCode → int
The hash code for this object.
no setterinherited
projectId → String
Project we are checking. Required for checkBlazeStatus / guideUpgrade callers that don't pass an explicit override.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkBlazeStatus({String? projectId}) → Future<BillingCheckResult>
Determine whether projectId is on Blaze billing.
guideUpgrade({String? projectId, int maxLoops = 3, bool interactive = true}) → Future<BillingCheckResult>
Walk the user through upgrading to Blaze.
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 Methods

gcpBillingUrl(String projectId) → String
Build the GCP console billing URL (alternate path used during upgrade).
isBillingAbsentError(String stderr) → bool
Returns true when stderr contains a recognizable "billing is missing or disabled" signature from gcloud / Firebase. Used by initialization code to surface a clear "upgrade to Blaze" hand-off instead of re-rendering the raw HTTP error.
upgradeUrl(String projectId) → String
Build the Firebase Console URL where the user can flip Spark → Blaze.