ignore islocal
This commit is contained in:
@@ -88,7 +88,7 @@ class Event {
|
|||||||
final String? parentId;
|
final String? parentId;
|
||||||
|
|
||||||
/// True if the event is generated by this client
|
/// True if the event is generated by this client
|
||||||
@JsonKey(defaultValue: false)
|
@JsonKey(ignore: true)
|
||||||
bool isLocal;
|
bool isLocal;
|
||||||
|
|
||||||
/// Map of custom channel extraData
|
/// Map of custom channel extraData
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ Event _$EventFromJson(Map<String, dynamic> json) {
|
|||||||
channelType: json['channel_type'] as String?,
|
channelType: json['channel_type'] as String?,
|
||||||
parentId: json['parent_id'] as String?,
|
parentId: json['parent_id'] as String?,
|
||||||
extraData: json['extra_data'] as Map<String, dynamic>?,
|
extraData: json['extra_data'] as Map<String, dynamic>?,
|
||||||
)..isLocal = json['is_local'] as bool? ?? false;
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> _$EventToJson(Event instance) {
|
Map<String, dynamic> _$EventToJson(Event instance) {
|
||||||
@@ -60,7 +60,6 @@ Map<String, dynamic> _$EventToJson(Event instance) {
|
|||||||
'unread_channels': instance.unreadChannels,
|
'unread_channels': instance.unreadChannels,
|
||||||
'online': instance.online,
|
'online': instance.online,
|
||||||
'parent_id': instance.parentId,
|
'parent_id': instance.parentId,
|
||||||
'is_local': instance.isLocal,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void writeNotNull(String key, dynamic value) {
|
void writeNotNull(String key, dynamic value) {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:test/test.dart';
|
|
||||||
import 'package:stream_chat/src/models/event.dart';
|
import 'package:stream_chat/src/models/event.dart';
|
||||||
import 'package:stream_chat/src/models/own_user.dart';
|
import 'package:stream_chat/src/models/own_user.dart';
|
||||||
import 'package:stream_chat/stream_chat.dart';
|
import 'package:stream_chat/stream_chat.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
group('src/models/event', () {
|
group('src/models/event', () {
|
||||||
@@ -77,7 +77,6 @@ void main() {
|
|||||||
'total_unread_count': 1,
|
'total_unread_count': 1,
|
||||||
'unread_channels': 1,
|
'unread_channels': 1,
|
||||||
'online': true,
|
'online': true,
|
||||||
'is_local': true,
|
|
||||||
'member': null,
|
'member': null,
|
||||||
'channel_id': null,
|
'channel_id': null,
|
||||||
'channel_type': null,
|
'channel_type': null,
|
||||||
|
|||||||
Reference in New Issue
Block a user