fromJson static method

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

Implementation

static GroupCallMessage? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return GroupCallMessage(
    messageId: (json['message_id'] as int?) ?? 0,
    senderId: MessageSender.fromJson(tdMapFromJson(json['sender_id'])),
    date: (json['date'] as int?) ?? 0,
    text: FormattedText.fromJson(tdMapFromJson(json['text'])),
    paidMessageStarCount: (json['paid_message_star_count'] as int?) ?? 0,
    isFromOwner: (json['is_from_owner'] as bool?) ?? false,
    canBeDeleted: (json['can_be_deleted'] as bool?) ?? false,
  );
}