load static method

GoogleServicesConfig load([
  1. String? path
])

Parses path, or the default location.

Throws FormatException naming the field that was missing, rather than letting a partial config reach the SDK and fail as an opaque init error.

Implementation

static GoogleServicesConfig load([String? path]) {
  final file = File(resolvePath(path));
  if (!file.existsSync()) {
    throw FileSystemException('no google-services.json', file.path);
  }
  return parse(file.readAsStringSync(), source: file.path);
}