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