GroupChannelScheduledFileMessageSendRequest constructor Null safety

GroupChannelScheduledFileMessageSendRequest(
  1. {required String channelUrl,
  2. required ScheduledFileMessageParams params}
)

Implementation

GroupChannelScheduledFileMessageSendRequest({
  required String channelUrl,
  required ScheduledFileMessageParams params,
}) : super() {
  if (userId == null) {
    throw InvalidParameterError;
  }
  url = 'group_channels/$channelUrl/scheduled_messages';
  body = {
    'user_id': userId,
    'message_type': 'FILE',
  };
  body.addAll(params.toJson());
  body.remove('file');
}