instanceFor static method
Returns an instance using a specified FirebaseApp
& region.
Implementation
static FirebaseFunctions instanceFor({FirebaseApp? app, String? region}) {
app ??= Firebase.app();
region ??= 'us-central1';
String cachedKey = '${app.name}_$region';
if (_cachedInstances.containsKey(cachedKey)) {
return _cachedInstances[cachedKey]!;
}
FirebaseFunctions newInstance =
FirebaseFunctions._(app: app, region: region);
_cachedInstances[cachedKey] = newInstance;
return newInstance;
}