btnLoading function

Widget btnLoading({
  1. bool loading = false,
  2. Color bgColor = Colors.white,
  3. double strokeWidth = 2,
  4. double width = 14,
  5. double height = 14,
})

Implementation

Widget btnLoading(
    {bool loading = false,
    Color bgColor = Colors.white,
    double strokeWidth = 2,
    double width = 14,
    double height = 14}) {
  return !loading
      ? const SizedBox()
      : Container(
          margin: const EdgeInsets.only(left: 10, right: 10),
          width: width,
          height: height,
          child: CircularProgressIndicator(
              strokeWidth: strokeWidth, backgroundColor: bgColor),
        );
}