showLoading method

void showLoading()

Implementation

void showLoading() {
  _showLoading = true;
  showDialog(
    context: context,
    barrierDismissible: false,
    useRootNavigator: false,
    builder: (BuildContext ctx) {
      return Dialog(
        elevation: 10.0,
        backgroundColor: Colors.black.withOpacity(0.8),
        shape: const RoundedRectangleBorder(
          borderRadius: BorderRadius.all(Radius.circular(10)),
        ),
        child: SizedBox(
          width: 104,
          height: 104,
          child: Container(
            width: 104,
            height: 104,
            padding: const EdgeInsets.all(16),
            alignment: Alignment.center,
            child: const CircularProgressIndicator(
              strokeWidth: 3,
              valueColor: AlwaysStoppedAnimation(Colors.white),
            ),
          ),
        ),
      );
    },
  );
}