FileMessageParams.withFile constructor Null safety

FileMessageParams.withFile(
  1. File file,
  2. {String? name,
  3. FileMessage? fileMessage}
)

Implementation

FileMessageParams.withFile(
  File file, {
  String? name,
  FileMessage? fileMessage,
}) : uploadFile = FileInfo.fromData(
        name: name ?? 'my_file',
        file: file,
        mimeType: lookupMimeType(file.path),
      );