FirebaseFunctions.instanceFor constructor

FirebaseFunctions.instanceFor({
  1. FirebaseApp? app,
  2. String region = defaultRegion,
})

Gets the FirebaseFunctions instance for the given app and region.

Implementation

factory FirebaseFunctions.instanceFor({
  FirebaseApp? app,
  String region = defaultRegion,
}) {
  final _app = app ?? Firebase.app();
  if (_instances[_app] == null) {
    _instances[_app] = {};
  }
  if (_instances[_app]![region] == null) {
    _instances[_app]![region] = FirebaseFunctions(app: _app, region: region);
  }
  return _instances[_app]![region]!;
}