fix: Missing null check

This commit is contained in:
Christian Pauly 2020-09-17 16:52:55 +02:00
parent 5d5c7fa8b4
commit 0fa2046c41

View file

@ -315,8 +315,8 @@ class DeviceListsUpdate {
List<String> changed; List<String> changed;
List<String> left; List<String> left;
DeviceListsUpdate.fromJson(Map<String, dynamic> json) { DeviceListsUpdate.fromJson(Map<String, dynamic> json) {
changed = List<String>.from(json['changed']); changed = List<String>.from(json['changed'] ?? []);
left = List<String>.from(json['left']); left = List<String>.from(json['left'] ?? []);
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final data = <String, dynamic>{}; final data = <String, dynamic>{};