fix: Fix type cast to fix test in matrix-fhir-dart-sdk

This commit is contained in:
Malin Errenst 2023-06-22 13:57:53 +02:00
parent 3dbcc120e5
commit 3bd36aa19f
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ class SyncUpdate {
});
SyncUpdate.fromJson(Map<String, Object?> json)
: nextBatch = json['next_batch'] as String,
: nextBatch = json.tryGet<String>('next_batch') ?? '',
rooms = (() {
final temp = json.tryGetMap<String, Object?>('rooms');
return temp != null ? RoomsUpdate.fromJson(temp) : null;