BatchUpdateChunksResponse.fromJson constructor

BatchUpdateChunksResponse.fromJson(
  1. Object? j
)

Implementation

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