ChannelMessage.fromJson constructor
ChannelMessage.fromJson(
- Map<String, dynamic> json
)
Implementation
factory ChannelMessage.fromJson(Map<String, dynamic> json) {
return ChannelMessage(
channelArn: json['ChannelArn'] as String?,
content: json['Content'] as String?,
createdTimestamp: timeStampFromJson(json['CreatedTimestamp']),
lastEditedTimestamp: timeStampFromJson(json['LastEditedTimestamp']),
lastUpdatedTimestamp: timeStampFromJson(json['LastUpdatedTimestamp']),
messageId: json['MessageId'] as String?,
metadata: json['Metadata'] as String?,
persistence:
(json['Persistence'] as String?)?.toChannelMessagePersistenceType(),
redacted: json['Redacted'] as bool?,
sender: json['Sender'] != null
? Identity.fromJson(json['Sender'] as Map<String, dynamic>)
: null,
type: (json['Type'] as String?)?.toChannelMessageType(),
);
}