RunTaskResponse.fromJson constructor

RunTaskResponse.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory RunTaskResponse.fromJson(Map<String, dynamic> json) {
  return RunTaskResponse(
    failures: (json['failures'] as List?)
        ?.whereNotNull()
        .map((e) => Failure.fromJson(e as Map<String, dynamic>))
        .toList(),
    tasks: (json['tasks'] as List?)
        ?.whereNotNull()
        .map((e) => Task.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}