We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1f71506 + c28997f commit 7146061Copy full SHA for 7146061
nakama/lib/src/nakama_client/nakama_api_client.dart
@@ -1415,7 +1415,15 @@ class NakamaRestApiClient extends NakamaBaseClient {
1415
query: query,
1416
);
1417
1418
- return res.matches?.map((e) => model.Match.fromJson(e.toJson())).toList(growable: false) ?? [];
+ return res.matches?.map((e) {
1419
+ final json = e.toJson();
1420
+ json['runtimeType'] = 'default';
1421
+ // Handle null values that are required fields in the domain model
1422
+ json['authoritative'] ??= false;
1423
+ json['label'] ??= '';
1424
+ json['presences'] ??= <Map<String, dynamic>>[];
1425
+ return model.Match.fromJson(json);
1426
+ }).toList(growable: false) ?? [];
1427
} on Exception catch (e) {
1428
throw _handleError(e);
1429
}
0 commit comments