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