BatchUploadResult class sealed
One outcome per requested attachment, and how the batch came to stop.
An upload failing does not make the batch fail — a batch of three where the middle one was refused still ran as asked, and finishes as BatchUploadCompleted. Each attachment's own outcome is on its BatchUploadItemResult.
Sealed, so a switch over the three ways a batch can end is exhaustive,
and the failure that gave up on one is only reachable once it has been
matched:
switch (await batch.result) {
case BatchUploadCompleted(:final items):
submit(items);
case BatchUploadStoppedOnError(:final error):
report(error);
case BatchUploadCancelled():
break;
}
These carry BatchUpload where BatchUploadState's members carry only
Batch on purpose: it is what tells a reader which of the two sealed
families a name belongs to, and it keeps BatchCancelling a batch still
calling its uploads off rather than one letter from a result.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
items
→ List<
BatchUploadItemResult> -
One outcome per requested attachment, in the order they were given.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited
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