UploadItem<T> class
One file in an Upload.
The kit never reads a file's bytes — picking and sending are the app's business. This carries only what has to be drawn, plus data for whatever object the app is really tracking.
- Annotations
Constructors
- UploadItem({required String name, Object? id, int? size, UploadStatus status = UploadStatus.pending, double progress = 0, Widget? error, Widget? thumbnail, T? data})
-
Creates an UploadItem.
const
Properties
- data → T?
-
The app's own object for this file — whatever its picker returned.
final
- error → Widget?
-
Why it failed, shown under the name. Only drawn for
UploadStatus.error.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → Object?
-
Identifies this file across rebuilds.
final
- key → Object
-
What id resolves to: the explicit one, or the name.
no setter
- name → String
-
The file's name, shown in the row and used for the extension glyph.
final
- progress → double
-
How far along, from 0 to 1. Only drawn while status is
UploadStatus.uploading.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → int?
-
Size in bytes. Null hides the size, for a source that does not know it.
final
- status → UploadStatus
-
Where this file stands.
final
- thumbnail → Widget?
-
Preview for this file, replacing the default extension glyph.
final
Methods
-
copyWith(
{String? name, Object? id, int? size, UploadStatus? status, double? progress, Widget? error, Widget? thumbnail, T? data}) → UploadItem< T> - A copy with the given fields replaced.
-
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