FileMessageCreateParams.withFileUrl constructor

FileMessageCreateParams.withFileUrl(
  1. String fileUrl,
  2. {String? fileName,
  3. String? mimeType,
  4. int? fileSize,
  5. String? data,
  6. String? customType,
  7. MentionType? mentionType,
  8. List<String>? mentionedUserIds,
  9. List<MessageMetaArray>? metaArrays,
  10. int? parentMessageId,
  11. bool? replyToChannel,
  12. PushNotificationDeliveryOption pushNotificationDeliveryOption = PushNotificationDeliveryOption.normal,
  13. bool isPinnedMessage = false}
)

withFileUrl

Implementation

FileMessageCreateParams.withFileUrl(
  String fileUrl, {
  String? fileName,
  String? mimeType,
  int? fileSize,
  String? data,
  String? customType,
  MentionType? mentionType,
  List<String>? mentionedUserIds,
  List<MessageMetaArray>? metaArrays,
  int? parentMessageId,
  bool? replyToChannel,
  PushNotificationDeliveryOption pushNotificationDeliveryOption =
      PushNotificationDeliveryOption.normal,
  bool isPinnedMessage = false,
})  : fileInfo = FileInfo.fromFileUrl(
        fileName: fileName ?? 'image',
        mimeType: mimeType ?? 'image/jpeg',
        fileUrl: fileUrl,
        fileSize: fileSize,
      ),
      super(
        data: data,
        customType: customType,
        pushNotificationDeliveryOption: pushNotificationDeliveryOption,
        metaArrays: metaArrays,
        mentionType: mentionType ?? MentionType.users,
        mentionedUserIds: mentionedUserIds,
        parentMessageId: parentMessageId,
        replyToChannel: replyToChannel ?? false,
        isPinnedMessage: isPinnedMessage,
      );