royalcat
d8ee8a3a24
All checks were successful
docker / build-docker (linux/amd64) (push) Successful in 1m34s
docker / build-docker (linux/386) (push) Successful in 1m37s
docker / build-docker (linux/arm64/v8) (push) Successful in 7m37s
docker / build-docker (linux/arm64) (push) Successful in 7m44s
docker / build-docker (linux/arm/v7) (push) Successful in 8m12s
25 lines
664 B
Dart
25 lines
664 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:tstor_ui/utils/bytes.dart';
|
|
|
|
class DownloadProgress extends StatelessWidget {
|
|
final int current;
|
|
final int total;
|
|
|
|
const DownloadProgress(this.current, this.total, {super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SizedBox(
|
|
height: 32,
|
|
child: Row(
|
|
children: [
|
|
Text("${current.bytesFormat()}/${total.bytesFormat()}"),
|
|
const SizedBox(width: 10),
|
|
Expanded(child: LinearProgressIndicator(value: current / total)),
|
|
const SizedBox(width: 10),
|
|
Text("${current / total * 100}%"),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|