mobile_skt/lib/widgets/loading_indicator.dart

24 lines
778 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(
color: AppTheme.primaryColorLight, size: ScreenAdaper.sp(40))
: CupertinoActivityIndicator(
animating: animating,
color: AppTheme.primaryColor,
radius: ScreenAdaper.sp(20),
);
2024-03-25 14:16:00 +08:00
}
}