TF-654 Show the progress of download attachment on web

This commit is contained in:
dab246
2022-08-06 19:52:15 +07:00
committed by Dat H. Pham
parent 6ad10cad4a
commit b0298ab02a
9 changed files with 226 additions and 9 deletions
@@ -2,6 +2,7 @@
import 'package:core/core.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:percent_indicator/circular_percent_indicator.dart';
import 'package:percent_indicator/linear_percent_indicator.dart';
mixin AppLoaderMixin {
@@ -21,6 +22,18 @@ mixin AppLoaderMixin {
backgroundColor: AppColor.colorBgMailboxSelected));
}
Widget circularPercentLoadingWidget(double percent) {
return Center(
child: CircularPercentIndicator(
percent: percent > 1.0 ? 1.0 : percent,
backgroundColor: AppColor.colorBgMailboxSelected,
progressColor: AppColor.primaryColor,
lineWidth: 3,
radius: 14,
)
);
}
Widget horizontalPercentLoadingWidget(double percent) {
return Center(
child: LinearPercentIndicator(