wonders/lib/ui/common/controls/app_loading_indicator.dart

23 lines
546 B
Dart
Raw Normal View History

2022-08-29 20:38:28 -06:00
import 'package:wonders/common_libs.dart';
class AppLoadingIndicator extends StatelessWidget {
const AppLoadingIndicator({super.key, this.value, this.color});
2022-08-29 20:38:28 -06:00
final Color? color;
final double? value;
@override
Widget build(BuildContext context) {
final progress = (value == null || value! < .05) ? null : value;
2022-08-29 20:38:28 -06:00
return SizedBox(
width: 40,
height: 40,
child: CircularProgressIndicator(
color: color ?? $styles.colors.accent1,
value: progress,
strokeWidth: 1.0,
),
);
2022-08-29 20:38:28 -06:00
}
}