forCurrentBackend static method
Implementation
static bool forCurrentBackend() {
String? projectId;
try {
if (Firebase.apps.isNotEmpty) {
projectId = Firebase.app().options.projectId;
}
} catch (_) {
// Firebase may still be unavailable in a unit test or early bootstrap.
// The explicit emulator flag remains a safe fail-closed signal.
}
return shouldSkipRegistration(
usesFirebaseEmulators: CloudEndpointPolicy.useFirebaseEmulators,
firebaseProjectId: projectId,
);
}