getCircularProgressBar static method
Widget
getCircularProgressBar({
- required BuildContext context,
- required double iosSize,
- required double androidSize,
- double strokeWidth = 4,
- AlwaysStoppedAnimation<
Color> ? color,
Implementation
static Widget getCircularProgressBar({required BuildContext context,
required double iosSize,
required double androidSize,
double strokeWidth = 4,
AlwaysStoppedAnimation<Color>? color}) {
Widget progressBar;
if (Platform.isIOS || Platform.isMacOS) {
progressBar = SizedBox(
width: iosSize,
height: iosSize,
child: CupertinoActivityIndicator(
color: Theme
.of(context)
.progressIndicatorTheme
.color,
),
);
} else {
progressBar = SizedBox(
width: androidSize,
height: androidSize,
child: CircularProgressIndicator(strokeWidth: strokeWidth, valueColor: color),
);
}
return progressBar;
}