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.PlatformFile wrapper.
factory
PickedFileInfo.fromPlatformFile(PlatformFile file, {String? mimeType})
factory
PickedFileInfo.fromXFile(XFile file, {String? mimeType})
Wraps an XFile (from image_picker) in a PickedFileInfo. Reads length synchronously from the underlying File — fine for local paths.
factory

Properties

extension String?
final
hashCode int
The hash code for this object.
no setterinherited
mimeType String?
final
name String
final
path String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sizeBytes int
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