Channel.fromJson constructor
Channel.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Channel.fromJson(Map<String, dynamic> json) {
return Channel(
channelArn: json['ChannelArn'] as String?,
createdBy: json['CreatedBy'] != null
? Identity.fromJson(json['CreatedBy'] as Map<String, dynamic>)
: null,
createdTimestamp: timeStampFromJson(json['CreatedTimestamp']),
lastMessageTimestamp: timeStampFromJson(json['LastMessageTimestamp']),
lastUpdatedTimestamp: timeStampFromJson(json['LastUpdatedTimestamp']),
metadata: json['Metadata'] as String?,
mode: (json['Mode'] as String?)?.toChannelMode(),
name: json['Name'] as String?,
privacy: (json['Privacy'] as String?)?.toChannelPrivacy(),
);
}