t×tecexpressby TeKOcloud
ENv0.7.1
API & Datentypen / FLUTTER

TxUploadContext.

Abbruch und Fortschrittsmeldung einer einzelnen Uploadoperation; Fortschritt wird in Bytes gemeldet.

TxUploadContext

ParameterTypStandardBedeutung
cancellationTxCancellationerforderlichToken für kooperativen Abbruch.
onProgressvoid Function(int loaded, int total)erforderlichMeldet abgeschlossene Bytes und Gesamtgröße.
dart
import 'package:tecexpress/tecexpress.dart';

Future<void> example() async {
  final context = TxUploadContext(cancellation: TxCancellation(), onProgress: (loaded, total) => print(loaded));
  context.onProgress(10, 20);
}