ScheduledFileMessageCreateParams.withFileBytes constructor
- Uint8List fileBytes,
- {required int scheduledAt,
- String? fileName,
- String? customType,
- String? data,
- MentionType mentionType = MentionType.users,
- List<
MessageMetaArray> ? metaArrays, - AppleCriticalAlertOptions? appleCriticalAlertOptions,
- PushNotificationDeliveryOption pushNotificationDeliveryOption = PushNotificationDeliveryOption.normal}
withFileBytes
Implementation
ScheduledFileMessageCreateParams.withFileBytes(
Uint8List fileBytes, {
required this.scheduledAt,
this.fileName,
this.customType,
this.data,
this.mentionType = MentionType.users,
this.metaArrays,
this.appleCriticalAlertOptions,
this.pushNotificationDeliveryOption = PushNotificationDeliveryOption.normal,
}) {
String? fileMimeType = lookupMimeType('', headerBytes: fileBytes);
if (fileMimeType != null) {
mimeType = fileMimeType;
} else if (mimeType == null) {
sbLog.w(StackTrace.current, 'Unknown file mimeType');
}
fileInfo = FileInfo.fromFileBytes(
fileBytes: fileBytes,
fileName: fileName ?? 'file',
mimeType: mimeType,
);
}