013014f0b5
Signed-off-by: dab246 <tdvu@linagora.com> (cherry picked from commit a02cb14233c4b23e26a0d2881604024893f6e1ce)
34 lines
1.0 KiB
Dart
34 lines
1.0 KiB
Dart
|
|
import 'package:core/presentation/extensions/color_extension.dart';
|
|
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:percent_indicator/linear_percent_indicator.dart';
|
|
|
|
mixin AppLoaderMixin {
|
|
|
|
Widget get loadingWidget {
|
|
return const Center(child: SizedBox(
|
|
width: 24,
|
|
height: 24,
|
|
child: CupertinoActivityIndicator(color: AppColor.colorLoading)));
|
|
}
|
|
|
|
Widget get horizontalLoadingWidget {
|
|
return const Center(
|
|
child: LinearProgressIndicator(
|
|
color: AppColor.primaryColor,
|
|
minHeight: 3,
|
|
backgroundColor: AppColor.colorBgMailboxSelected));
|
|
}
|
|
|
|
Widget horizontalPercentLoadingWidget(double percent) {
|
|
return Center(
|
|
child: LinearPercentIndicator(
|
|
lineHeight: 3.0,
|
|
percent: percent > 1.0 ? 1.0 : percent,
|
|
barRadius: const Radius.circular(4),
|
|
backgroundColor: AppColor.colorBgMailboxSelected,
|
|
progressColor: AppColor.primaryColor,
|
|
));
|
|
}
|
|
} |