fix event

This commit is contained in:
Salvatore Giordano
2021-04-20 09:35:11 +02:00
parent d9cd6ea55f
commit 7226d8c4d3
2 changed files with 3 additions and 2 deletions
@@ -88,7 +88,8 @@ class Event {
final String? parentId;
/// True if the event is generated by this client
late final bool isLocal;
@JsonKey(defaultValue: false)
bool isLocal;
/// Map of custom channel extraData
@JsonKey(includeIfNull: false)
@@ -39,7 +39,7 @@ Event _$EventFromJson(Map<String, dynamic> json) {
channelType: json['channel_type'] as String?,
parentId: json['parent_id'] as String?,
extraData: json['extra_data'] as Map<String, dynamic>?,
)..isLocal = json['is_local'] as bool?;
)..isLocal = json['is_local'] as bool? ?? false;
}
Map<String, dynamic> _$EventToJson(Event instance) {