XPickedFile class
A file the user picked. path is on local disk and readable by
dart:io File while the picker session's grant is active.
On macOS / iOS the picker returns the user's original location (no
temp-dir copy); access across cold restarts is preserved by storing
bookmark and re-acquiring scope via XFiles.withScopedAccess /
XFiles.open / XFiles.showInFolder. On Android the native side
stream-copies a content:// source into the app cache (since
dart:io can't open content URIs); bookmark holds the source URI
as UTF-8 bytes for symmetry but isn't required for reads.
Constructors
Properties
- bookmark → Uint8List?
-
macOS / iOS scoped bookmark, or Android URI bytes. Persist alongside
path so future opens can re-acquire access. Null on platforms that
don't need it (or when the platform supplied no bookmark).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isTemporaryCopy → bool
-
True when path is an app-owned temp copy the platform made for us
rather than a durable user-chosen location: the Android SAF picker
stream-copies a
content://source into the app cache (sincedart:iocan't open content URIs). Callers should treat such a source as ephemeral — e.g. promote its bytes into a managed cache after upload instead of referencing the temp in place (it is cleared by the OS and isn't externally openable on Android). False for macOS/iOS/desktop picks, which return the user's real file.final - mimeType → String?
-
Media type the picker reported, where it reported one.
final
- name → String?
-
Display name the picker reported, where it reported one.
final
- path → String
-
Absolute path on local disk, readable while the grant is active.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → int?
-
Size in bytes the picker reported, where it reported one.
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