loader static method
A centered circular loading indicator.
Implementation
static Widget loader({Color? color, double size = 28, double strokeWidth = 2.5}) {
return Center(
child: SizedBox(
width: size,
height: size,
child: CircularProgressIndicator(
strokeWidth: strokeWidth,
valueColor: AlwaysStoppedAnimation<Color>(color ?? Colors.white),
),
),
);
}