feat: ui improvement

flutter 3.7 compatibility
responsive view
beautiful progress bar
select file in treeview
downlading and downloaded page
This commit is contained in:
wuke2022 authored and liwei committed 2023-02-16 11:34:42 +08:00
1 parent a875a9258e
commit 9b1ed15fea
28 files changed
+932 -439

No files matched your search

@@ -0,0 +1,31 @@
import 'dart:async';
import 'package:get/get.dart';
import '../../api/api.dart';
import '../../api/model/task.dart';
class DownloadedController extends GetxController {
final tasks = <Task>[].obs;
late final Timer _timer;
@override
void onInit() async {
super.onInit();
await getTasksState();
_timer = Timer.periodic(const Duration(milliseconds: 1000), (timer) async {
// debugPrint('timer${DateTime.now()}');
await getTasksState();
});
}
@override
void onClose() {
super.onClose();
_timer.cancel();
}
getTasksState() async {
tasks.value = await getTasks([Status.done]);
}
}