mobile_skt/lib/widgets/loading_indicator.dart

27 lines
895 B
Dart

import 'package:flutter/cupertino.dart';
import 'package:loading_animation_widget/loading_animation_widget.dart';
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;
final bool common;
const LoadingIndicator(
{super.key, this.animating = true, this.common = false});
@override
Widget build(BuildContext context) {
return common
? LoadingAnimationWidget.fourRotatingDots(
color: AppTheme.primaryColorLight, size: ScreenAdaper.height(45))
: Container(
padding: EdgeInsets.all(ScreenAdaper.height(10)),
child: CupertinoActivityIndicator(
animating: animating,
color: AppTheme.primaryColor,
radius: ScreenAdaper.sp(25),
),
);
}
}