FileUtils class
Methods
-
checkFileError(PlatformFile file, List<String> allowedExtensions, int maxAllowedWeight, Size? forcedImageSize, double? aspectRatio)
→ Future<void>
-
Vérifie si un fichier respecte les contraintes de taille et de format.
-
consolidateStreamToBytes(Stream<List<int>> stream)
→ Future<Uint8List>
-
-
downloadDocument(Uint8List bytes, String fileName, String extension)
→ Future<XFile?>
-
-
downloadFile(Uint8List bytes, String fileName, String extension)
→ Future<XFile?>
-
inherited
-
getBytes(List<PlatformFile> filesList)
→ Future<List<Uint8List>>
-
inherited
-
getFilesListBytes()
→ Future<List<Uint8List>>
-
-
-
getJpegDimensions(Uint8List bytes)
→ Size
-
Extracts width and height from a JPEG file header.
Throws an exception if the file is not a valid JPEG or if dimensions cannot be read.
-
getPngDimensions(Uint8List bytes)
→ Size
-
Extracts width and height from a PNG file header.
Throws an exception if the file is not a valid PNG or if dimensions cannot be read.
-
getWebPDimensions(Uint8List bytes)
→ Size
-
Extracts width and height from a WebP file header.
Throws an exception if the file is not a valid WebP or if dimensions cannot be read.
-
handleDeleteFileFromStack(PlatformFile file)
→ List<PlatformFile>
-
-
handleDropFiles(List<XFile> droppedFiles, List<String> allowedExtensions, {int? maxAllowedWeight = 10000000, Size? forcedImageSize, double? aspectRatio})
→ Future<List<PlatformFile>>
-
-
handlePickFile({List<String>? allowedExtensions, required FilePickerResult? pickerResults, int? maxAllowedWeight, Size? forcedImageSize, double? aspectRatio})
→ Future<List<PlatformFile>>
-
-
launchUrlFromUri(Uri uri)
→ Future<void>
-
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
writeFile(Uint8List data, String path)
→ Future<XFile>
-
inherited
-
writeToFile(Uint8List data, String path)
→ Future<XFile>
-