2022-08-29 20:38:28 -06:00
|
|
|
import 'package:wonders/common_libs.dart';
|
|
|
|
|
|
|
|
class AppLoadingIndicator extends StatelessWidget {
|
2024-02-20 13:56:39 -08:00
|
|
|
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) {
|
2023-02-13 10:38:55 -07:00
|
|
|
final progress = (value == null || value! < .05) ? null : value;
|
|
|
|
|
2022-08-29 20:38:28 -06:00
|
|
|
return SizedBox(
|
2023-02-13 10:38:55 -07:00
|
|
|
width: 40,
|
|
|
|
height: 40,
|
|
|
|
child: CircularProgressIndicator(
|
|
|
|
color: color ?? $styles.colors.accent1,
|
|
|
|
value: progress,
|
|
|
|
strokeWidth: 1.0,
|
|
|
|
),
|
|
|
|
);
|
2022-08-29 20:38:28 -06:00
|
|
|
}
|
|
|
|
}
|