fixed tests
This commit is contained in:
@@ -93,6 +93,7 @@ class Event {
|
||||
final bool isLocal;
|
||||
|
||||
/// This is true if the message has been hard deleted
|
||||
@JsonKey(includeIfNull: false)
|
||||
final bool? hardDelete;
|
||||
|
||||
/// Map of custom channel extraData
|
||||
|
||||
@@ -42,7 +42,8 @@ Event _$EventFromJson(Map<String, dynamic> json) => Event(
|
||||
isLocal: json['is_local'] as bool? ?? false,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$EventToJson(Event instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$EventToJson(Event instance) {
|
||||
final val = <String, dynamic>{
|
||||
'type': instance.type,
|
||||
'cid': instance.cid,
|
||||
'channel_id': instance.channelId,
|
||||
@@ -60,10 +61,19 @@ Map<String, dynamic> _$EventToJson(Event instance) => <String, dynamic>{
|
||||
'online': instance.online,
|
||||
'parent_id': instance.parentId,
|
||||
'is_local': instance.isLocal,
|
||||
'hard_delete': instance.hardDelete,
|
||||
'extra_data': instance.extraData,
|
||||
};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
if (value != null) {
|
||||
val[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('hard_delete', instance.hardDelete);
|
||||
val['extra_data'] = instance.extraData;
|
||||
return val;
|
||||
}
|
||||
|
||||
EventChannel _$EventChannelFromJson(Map<String, dynamic> json) => EventChannel(
|
||||
members: (json['members'] as List<dynamic>?)
|
||||
?.map((e) => Member.fromJson(e as Map<String, dynamic>))
|
||||
|
||||
Reference in New Issue
Block a user