PickedFileInfo class
Lightweight value object exposing picked-file metadata to widget builders
without leaking the underlying file_picker types.
Constructors
- PickedFileInfo({required String name, required String path, required int sizeBytes, String? extension, String? mimeType})
-
const
- PickedFileInfo.fromPath(String path, {String? name, String? mimeType})
-
Constructs from a local file path. Useful for files produced in-app
(e.g. by VoiceRecorder) where there's no
XFile/fp.PlatformFilewrapper.factory - PickedFileInfo.fromPlatformFile(PlatformFile file, {String? mimeType})
-
factory
- PickedFileInfo.fromXFile(XFile file, {String? mimeType})
-
Wraps an
XFile(fromimage_picker) in a PickedFileInfo. Reads length synchronously from the underlying File — fine for local paths.factory
Properties
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