PickedFile class
Represents a file that has been picked by the user.
This class contains all the information about a selected file, including its path, name, size, MIME type, and optionally its bytes.
Constructors
- PickedFile({required String path, required String name, required int size, String? mimeType, Uint8List? bytes})
- Creates a new PickedFile instance.
-
PickedFile.fromMap(Map<
String, dynamic> map) -
Creates a PickedFile instance from a map representation.
factory
Properties
- bytes → Uint8List?
-
The bytes of the picked file (only available when withData is true).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- mimeType → String?
-
The MIME type of the picked file (e.g., 'image/jpeg', 'application/pdf').
final
- name → String
-
The name of the picked file including its extension.
final
- path → String
-
The absolute path to the picked file.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → int
-
The size of the picked file in bytes.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> - Converts this PickedFile to a map representation.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited