ignore islocal

This commit is contained in:
Salvatore Giordano
2021-04-20 09:41:41 +02:00
parent 7226d8c4d3
commit 79769acef0
3 changed files with 3 additions and 5 deletions
@@ -88,7 +88,7 @@ class Event {
final String? parentId;
/// True if the event is generated by this client
@JsonKey(defaultValue: false)
@JsonKey(ignore: true)
bool isLocal;
/// Map of custom channel extraData
@@ -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? ?? false;
);
}
Map<String, dynamic> _$EventToJson(Event instance) {
@@ -60,7 +60,6 @@ Map<String, dynamic> _$EventToJson(Event instance) {
'unread_channels': instance.unreadChannels,
'online': instance.online,
'parent_id': instance.parentId,
'is_local': instance.isLocal,
};
void writeNotNull(String key, dynamic value) {
@@ -1,9 +1,9 @@
import 'dart:convert';
import 'package:test/test.dart';
import 'package:stream_chat/src/models/event.dart';
import 'package:stream_chat/src/models/own_user.dart';
import 'package:stream_chat/stream_chat.dart';
import 'package:test/test.dart';
void main() {
group('src/models/event', () {
@@ -77,7 +77,6 @@ void main() {
'total_unread_count': 1,
'unread_channels': 1,
'online': true,
'is_local': true,
'member': null,
'channel_id': null,
'channel_type': null,