Null aware handler for the owner field
This commit is contained in:
parent
50e17b045a
commit
7bb04473a3
|
@ -21,7 +21,7 @@ class TaskList {
|
|||
|
||||
TaskList.fromJson(Map<String, dynamic> json, {tasksJson})
|
||||
: id = json['id'],
|
||||
owner = User.fromJson(json['owner']),
|
||||
owner = json['owner'] == null ? null : User.fromJson(json['owner']),
|
||||
description = json['description'],
|
||||
title = json['title'],
|
||||
updated = DateTime.parse(json['updated']),
|
||||
|
|
Reference in New Issue