ChannelFileMessageUpdateRequest constructor Null safety

ChannelFileMessageUpdateRequest(
  1. {required String channelUrl,
  2. required int messageId,
  3. required FileMessageParams params}
)

Implementation

ChannelFileMessageUpdateRequest({
  required String channelUrl,
  required int messageId,
  required FileMessageParams params,
}) : super() {
  payload.addAll({
    'channel_url': channelUrl,
    'msg_id': messageId,
    'data': params.data,
    'custom_type': params.customType,
    'mention_type': params.mentionType,
    'mentioned_user_ids': params.mentionedUserIds
  });
  payload.removeWhere((key, value) => value == null);
}