diff --git a/lib/src/model/sync_update.dart b/lib/src/model/sync_update.dart index f78fb566..806c9c52 100644 --- a/lib/src/model/sync_update.dart +++ b/lib/src/model/sync_update.dart @@ -45,7 +45,7 @@ class SyncUpdate { }); SyncUpdate.fromJson(Map json) - : nextBatch = json['next_batch'] as String, + : nextBatch = json.tryGet('next_batch') ?? '', rooms = (() { final temp = json.tryGetMap('rooms'); return temp != null ? RoomsUpdate.fromJson(temp) : null;