loader static method

Widget loader({
  1. Color? color,
  2. double size = 28,
  3. double strokeWidth = 2.5,
})

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),
      ),
    ),
  );
}