mobile_skt/lib/widgets/loading_indicator.dart

24 lines
782 B
Dart
Raw Normal View History

2024-03-25 14:16:00 +08:00
import 'package:flutter/cupertino.dart';
2024-03-26 15:30:43 +08:00
import 'package:loading_animation_widget/loading_animation_widget.dart';
2024-03-25 14:16:00 +08:00
import 'package:sk_base_mobile/app_theme.dart';
import 'package:sk_base_mobile/util/screen_adaper_util.dart';
class LoadingIndicator extends StatelessWidget {
final bool animating;
2024-03-26 15:30:43 +08:00
final bool common;
const LoadingIndicator(
{super.key, this.animating = true, this.common = false});
2024-03-25 14:16:00 +08:00
@override
Widget build(BuildContext context) {
2024-03-26 15:30:43 +08:00
return common
? LoadingAnimationWidget.fourRotatingDots(
2024-03-28 17:18:46 +08:00
color: AppTheme.primaryColorLight, size: ScreenAdaper.height(45))
2024-03-26 15:30:43 +08:00
: CupertinoActivityIndicator(
animating: animating,
color: AppTheme.primaryColor,
2024-03-26 16:36:27 +08:00
radius: ScreenAdaper.sp(25),
2024-03-26 15:30:43 +08:00
);
2024-03-25 14:16:00 +08:00
}
}