ChannelMembership.fromJson constructor

ChannelMembership.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ChannelMembership.fromJson(Map<String, dynamic> json) {
  return ChannelMembership(
    channelArn: json['ChannelArn'] as String?,
    createdTimestamp: timeStampFromJson(json['CreatedTimestamp']),
    invitedBy: json['InvitedBy'] != null
        ? Identity.fromJson(json['InvitedBy'] as Map<String, dynamic>)
        : null,
    lastUpdatedTimestamp: timeStampFromJson(json['LastUpdatedTimestamp']),
    member: json['Member'] != null
        ? Identity.fromJson(json['Member'] as Map<String, dynamic>)
        : null,
    type: (json['Type'] as String?)?.toChannelMembershipType(),
  );
}