#8 Added marker to indicate read status in talk chats

This commit is contained in:
2024-03-10 22:03:01 +01:00
parent 948ee19bda
commit 41372e9e86
25 changed files with 279 additions and 99 deletions

View File

@ -1,10 +1,11 @@
import 'package:json_annotation/json_annotation.dart';
import 'package:marianum_mobile/api/apiResponse.dart';
part 'getParticipantsResponse.g.dart';
@JsonSerializable(explicitToJson: true)
class GetParticipantsResponse {
class GetParticipantsResponse extends ApiResponse {
Set<GetParticipantsResponseObject> data;
GetParticipantsResponse(this.data);

View File

@ -13,13 +13,24 @@ GetParticipantsResponse _$GetParticipantsResponseFromJson(
.map((e) =>
GetParticipantsResponseObject.fromJson(e as Map<String, dynamic>))
.toSet(),
);
)..headers = (json['headers'] as Map<String, dynamic>?)?.map(
(k, e) => MapEntry(k, e as String),
);
Map<String, dynamic> _$GetParticipantsResponseToJson(
GetParticipantsResponse instance) =>
<String, dynamic>{
'data': instance.data.map((e) => e.toJson()).toList(),
};
GetParticipantsResponse instance) {
final val = <String, dynamic>{};
void writeNotNull(String key, dynamic value) {
if (value != null) {
val[key] = value;
}
}
writeNotNull('headers', instance.headers);
val['data'] = instance.data.map((e) => e.toJson()).toList();
return val;
}
GetParticipantsResponseObject _$GetParticipantsResponseObjectFromJson(
Map<String, dynamic> json) =>