Files class

Files provide verity of file picker like camera, gallery, file pre-define ui for file picker use customize ui and file pick

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

cameraPicker({required FileData fileData, required dynamic onSelected(FileData fileData), dynamic onCancel(String message, int messageCode)?, bool crop = false, int? maxFileSizeInMb, bool cropOnlySquare = false, String cropperToolbarTitle = Files.cropperToolbarTitle, Color cropperToolbarColor = Files.cropperToolbarColor, Color cropperToolbarWidgetsColor = Files.cropperToolbarWidgetsColor}) → dynamic
function camera picker for take picture and save to temporary cache directory
deleteFile({required FileData fileData, required dynamic onDeleted(FileData fileData)}) → dynamic
function file deletion
filePicker({required FileData fileData, required dynamic onSelected(FileData fileData), dynamic onCancel(String message, int messageCode)?, int? maxFileSizeInMb, List<String>? allowedExtensions}) → dynamic
function file picker for pick any file and save to temporary cache directory
filePickerOptions({required BuildContext context, required FileData fileData, required FileMode fileMode, required dynamic onSelected(FileData fileData), dynamic onCancel(String message, int messageCode)?, bool crop = false, int? maxFileSizeInMB, bool cropOnlySquare = false, String cropperToolbarTitle = Files.cropperToolbarTitle, Color cropperToolbarColor = Files.cropperToolbarColor, Color cropperToolbarWidgetsColor = Files.cropperToolbarWidgetsColor, List<String>? allowedExtensions}) → dynamic
function file picker options
getFileExtension(String? path, {bool withDot = true}) String
get file extension
getFileName(String? path, {bool withExtension = true}) String
get file name from file path or url
getMimeType(String? path) String
get file mime type
imagePicker({required FileData fileData, required dynamic onSelected(FileData fileData), dynamic onCancel(String message, int messageCode)?, bool crop = false, int? maxFileSizeInMb, bool cropOnlySquare = false, String cropperToolbarTitle = Files.cropperToolbarTitle, Color cropperToolbarColor = Files.cropperToolbarColor, Color cropperToolbarWidgetsColor = Files.cropperToolbarWidgetsColor}) → dynamic
function image picker for pick image from gallery and save to temporary cache directory
isHttpPath(String filePath) bool
check http file path
kb(int sizeInBytes) double
get file size in KB
mb(int sizeInBytes) double
get file size in MB
setFileDataFromUpdate({required String? path}) FileData
selected file path or url to set FileData
viewFile({required FileData fileData, dynamic onView(FileData fileData)?}) → dynamic
function file view

Constants

apk → const String
bmp → const String
cropperToolbarColor → const Color
cropperToolbarTitle → const String
cropperToolbarWidgetsColor → const Color
csv → const String
doc → const String
docm → const String
docx → const String
gif → const String
ipa → const String
jar → const String
jpeg → const String
jpg → const String
m4a → const String
mov → const String
mp3 → const String
mp4 → const String
mpeg → const String
mpg → const String
ods → const String
odt → const String
otf → const String
pdf → const String
png → const String
ppt → const String
pptm → const String
pptx → const String
rar → const String
rtf → const String
svg → const String
ttf → const String
txt → const String
wav → const String
xls → const String
xlsm → const String
xlsx → const String
zip → const String