update
This commit is contained in:
parent
5591f145a9
commit
d8ee8a3a24
166 changed files with 15431 additions and 889 deletions
ui/lib/components
25
ui/lib/components/download.dart
Normal file
25
ui/lib/components/download.dart
Normal file
|
@ -0,0 +1,25 @@
|
|||
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}%"),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue