fix: generated new models, fixed reactions

This commit is contained in:
Deven Joshi
2021-04-14 19:31:59 +05:30
parent 2d11e32700
commit 834e29c3cc
11 changed files with 65 additions and 61 deletions
@@ -16,22 +16,22 @@ Event _$EventFromJson(Map<String, dynamic> json) {
: DateTime.parse(json['created_at'] as String),
me: json['me'] == null
? null
: OwnUser.fromJson(json['me'] as Map<String, dynamic>?),
: OwnUser.fromJson(json['me'] as Map<String, dynamic>),
user: json['user'] == null
? null
: User.fromJson(json['user'] as Map<String, dynamic>?),
: User.fromJson(json['user'] as Map<String, dynamic>),
message: json['message'] == null
? null
: Message.fromJson(json['message'] as Map<String, dynamic>?),
: Message.fromJson(json['message'] as Map<String, dynamic>),
totalUnreadCount: json['total_unread_count'] as int?,
unreadChannels: json['unread_channels'] as int?,
reaction: json['reaction'] == null
? null
: Reaction.fromJson(json['reaction'] as Map<String, dynamic>?),
: Reaction.fromJson(json['reaction'] as Map<String, dynamic>),
online: json['online'] as bool?,
channel: json['channel'] == null
? null
: EventChannel.fromJson(json['channel'] as Map<String, dynamic>?),
: EventChannel.fromJson(json['channel'] as Map<String, dynamic>),
member: json['member'] == null
? null
: Member.fromJson(json['member'] as Map<String, dynamic>),
@@ -84,7 +84,7 @@ EventChannel _$EventChannelFromJson(Map<String, dynamic> json) {
config: ChannelConfig.fromJson(json['config'] as Map<String, dynamic>),
createdBy: json['created_by'] == null
? null
: User.fromJson(json['created_by'] as Map<String, dynamic>?),
: User.fromJson(json['created_by'] as Map<String, dynamic>),
frozen: json['frozen'] as bool? ?? false,
lastMessageAt: json['last_message_at'] == null
? null