TaskPageResponse.fromJson constructor

TaskPageResponse.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory TaskPageResponse.fromJson(Map<String, Object?> json) {
  return TaskPageResponse(
    results: (json[r'results'] as List<Object?>?)
            ?.map(
                (i) => Task.fromJson(i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    start: (json[r'start'] as num?)?.toInt() ?? 0,
    limit: (json[r'limit'] as num?)?.toInt() ?? 0,
    size: (json[r'size'] as num?)?.toInt() ?? 0,
  );
}