Files
Hacki/lib/screens/widgets/custom_circular_progress_indicator.dart
Jiaqi Feng cff4a3c5c4 v0.2.22 (#59)
* bumped version.

* cleaned up code.

* bumped version.

* fixed lint.

* updated android config.

* prevent backup of secure storage.

* small fix.

* cleaned up code.

* cleaned up.

* small fix
2022-06-22 23:44:49 -07:00

25 lines
751 B
Dart

import 'package:flutter/material.dart';
import 'package:hacki/styles/styles.dart';
/// Circular progress indicator with color.
/// Changing `colorScheme`'s `primary` color doesn't work because it changes
/// the color of multiple widgets like
/// CircularProgressIndicators and TextFields.
/// We only want the CircularProgressIndicators to be `Palette.purple`.
class CustomCircularProgressIndicator extends StatelessWidget {
const CustomCircularProgressIndicator({
super.key,
this.strokeWidth = 4,
});
final double strokeWidth;
@override
Widget build(BuildContext context) {
return CircularProgressIndicator(
strokeWidth: strokeWidth,
valueColor: const AlwaysStoppedAnimation<Color>(Palette.orange),
);
}
}