Abbruch und Fortschrittsmeldung einer einzelnen Uploadoperation; Fortschritt wird in Bytes gemeldet.
TxUploadContext
| Parameter | Typ | Standard | Bedeutung |
|---|---|---|---|
| cancellation | TxCancellation | erforderlich | Token für kooperativen Abbruch. |
| onProgress | void Function(int loaded, int total) | erforderlich | Meldet abgeschlossene Bytes und Gesamtgröße. |
import 'package:tecexpress/tecexpress.dart';
Future<void> example() async {
final context = TxUploadContext(cancellation: TxCancellation(), onProgress: (loaded, total) => print(loaded));
context.onProgress(10, 20);
}