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