loading static method

dynamic loading(
  1. dynamic context,
  2. dynamic title, {
  3. bool? ableToClose = false,
})

Implementation

static loading(context, title, {bool? ableToClose = false}) {
  showDialog(
    context: context,
    barrierDismissible: ableToClose ?? false,
    builder: (BuildContext context) {
      return AlertDialog(
        elevation: 0,
        // backgroundColor: Colors.white,
        content: Row(
          crossAxisAlignment: CrossAxisAlignment.center,
          mainAxisSize: MainAxisSize.min,
          children: [
            // LoadingAnimationWidget.beat(color: purpleColor, size: 20),
            const SizedBox(
              width: 40,
              height: 40,
              child: CircularProgressIndicator(),
            ),
            const SizedBox(
              width: 10,
            ),
            Text(
              title,
              style: const TextStyle(
                fontSize: 18,
                fontWeight: FontWeight.w800,
              ),
            ),
          ],
        ),
      );
    },
  );
}