ServiceAccount.fromJson constructor
ServiceAccount.fromJson(
- Object? j
Implementation
factory ServiceAccount.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return ServiceAccount(
email: switch (json['email']) {
null => null,
Object $1 => decodeString($1),
},
scopes: switch (json['scopes']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException('"scopes" is not a list'),
},
);
}