ChannelMessageTranslateRequest constructor Null safety

ChannelMessageTranslateRequest(
  1. {required ChannelType channelType,
  2. required String channelUrl,
  3. required int messageId,
  4. required List<String> targetLanguages}
)

Implementation

ChannelMessageTranslateRequest({
  required ChannelType channelType,
  required String channelUrl,
  required int messageId,
  required List<String> targetLanguages,
}) : super() {
  url =
      '${channelType.urlString}/$channelUrl/messages/$messageId/translation';
  body = {'target_langs': targetLanguages};
}