CloudEndpointPolicy class
Resolves direct HTTP Cloud Function endpoints without letting debug/profile builds reach production by accident.
Release builds keep their existing production URLs. Non-release builds use the local Functions emulator by default. Disabling the emulator in a non-release build blocks the request instead of silently falling back to a production endpoint.
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
-
no setter
- usesLocalEndpoints → bool
-
no setter
Static Methods
-
functionUrl(
{required String functionName, required String productionUrl}) → String -
resolveFunctionUrl(
{required String functionName, required String productionUrl, required bool isRelease, required bool usesEmulators, String host = '127.0.0.1', int port = 5001, String projectId = 'demo-emxi-local', String region = 'us-central1'}) → String
Constants
- emulatorHost → const String
- emulatorProjectId → const String
- functionsEmulatorPort → const int
- functionsRegion → const String
- useFirebaseEmulators → const bool