fix models
This commit is contained in:
@@ -6,18 +6,15 @@ part of 'channel_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
ChannelModel _$ChannelModelFromJson(Map json) {
|
||||
ChannelModel _$ChannelModelFromJson(Map<String, dynamic> json) {
|
||||
return ChannelModel(
|
||||
id: json['id'] as String?,
|
||||
type: json['type'] as String?,
|
||||
cid: json['cid'] as String,
|
||||
config: ChannelConfig.fromJson(
|
||||
Map<String, dynamic>.from(json['config'] as Map)),
|
||||
config: ChannelConfig.fromJson(json['config'] as Map<String, dynamic>),
|
||||
createdBy: json['created_by'] == null
|
||||
? null
|
||||
: User.fromJson((json['created_by'] as Map?)?.map(
|
||||
(k, e) => MapEntry(k as String, e),
|
||||
)),
|
||||
: User.fromJson(json['created_by'] as Map<String, dynamic>?),
|
||||
frozen: json['frozen'] as bool,
|
||||
lastMessageAt: json['last_message_at'] == null
|
||||
? null
|
||||
@@ -28,9 +25,7 @@ ChannelModel _$ChannelModelFromJson(Map json) {
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
memberCount: json['member_count'] as int,
|
||||
extraData: (json['extra_data'] as Map?)?.map(
|
||||
(k, e) => MapEntry(k as String, e),
|
||||
),
|
||||
extraData: json['extra_data'] as Map<String, dynamic>?,
|
||||
team: json['team'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user