UFileData class

A picked or captured file: bytes, name, extension, url or id. file.bytes, file.name, file.isImage

Constructors

UFileData({Uint8List? bytes, String? extension, String? url, String? id, List<int>? tags, List<UFileData>? children, String? name})
Holds a file in memory (bytes) or remotely (url/id); tags and children are for your own grouping.

Properties

bytes → Uint8List?
File content (null for remote files).
final
children → List<UFileData>?
Related files, e.g. pages of a document.
final
extension → String?
Extension without the dot, e.g. "jpg".
final
hasBytes → bool
True when the content is in memory.
no setter
hashCode → int
The hash code for this object.
no setterinherited
id → String?
Your own id, e.g. the server media id.
final
isImage → bool
True for image extensions (jpg, png, webp, heic…).
no setter
name → String?
File name with extension, e.g. "photo.jpg".
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sizeInBytes → int?
Size of bytes; null when not loaded.
no setter
tags → List<int>?
Your own numeric tags (e.g. TagMedia numbers).
final
url → String?
Remote address when the file lives on a server.
final

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