BlobUploadProgress constructor
BlobUploadProgress({
- required String currentServer,
- required int sentBytes,
- required int totalBytes,
- required List<
BlobUploadResult> completedUploads, - UploadPhase phase = UploadPhase.uploading,
- double? progressPhase,
- int? mirrorsTotal,
- int? mirrorsCompleted,
- bool isComplete = false,
Implementation
BlobUploadProgress({
required this.currentServer,
required this.sentBytes,
required this.totalBytes,
required this.completedUploads,
this.phase = UploadPhase.uploading,
double? progressPhase,
int? mirrorsTotal,
int? mirrorsCompleted,
this.isComplete = false,
}) : progressPhase =
((progressPhase ?? (totalBytes > 0 ? sentBytes / totalBytes : 0))
.clamp(0.0, 1.0))
.toDouble(),
percentagePhase =
((progressPhase ?? (totalBytes > 0 ? sentBytes / totalBytes : 0))
.clamp(0.0, 1.0))
.toDouble() *
100,
mirrorsTotal = mirrorsTotal ?? 0,
mirrorsCompleted = mirrorsCompleted ?? 0;