FileExtensions extension

Extensions on File for sizes and media-type checks.

on

Properties

isAudio → bool

Available on File, provided by the FileExtensions extension

Whether the file extension is a common audio type.
no setter
isImage → bool

Available on File, provided by the FileExtensions extension

Whether the file extension is a common image type.
no setter
isVideo → bool

Available on File, provided by the FileExtensions extension

Whether the file extension is a common video type.
no setter
sizeBytes → int

Available on File, provided by the FileExtensions extension

Gets the file size in bytes.
no setter
sizeInMB → double

Available on File, provided by the FileExtensions extension

File size in megabytes.
no setter

Methods

readAsStringSafe() → Future<String?>

Available on File, provided by the FileExtensions extension

Reads the file as UTF-8, or returns null on error.
sizeFormatted() → String

Available on File, provided by the FileExtensions extension

Gets the file size as a formatted string (e.g., "1.2 MB").