From 3bd36aa19f13d24b3e24bbea66936859d38637c0 Mon Sep 17 00:00:00 2001 From: Malin Errenst Date: Thu, 22 Jun 2023 13:57:53 +0200 Subject: [PATCH] fix: Fix type cast to fix test in matrix-fhir-dart-sdk --- lib/src/model/sync_update.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;