showLoader function

void showLoader()

Implementation

void showLoader() {
  showDialog(
    context: navigatorKeyTry.currentContext!,
    barrierDismissible: false,
    builder: (BuildContext context) {
      return SizedBox(
        width: MediaQuery.sizeOf(context).width,
        height: MediaQuery.sizeOf(context).height,
        child: Center(
          child: Container(
                  width: 80,
                  height: 80,
                  decoration: BoxDecoration(
                    color: Theme.of(context).cardColor.withOpacity(0.7),
                    borderRadius: BorderRadius.circular(10),
                  ),
                  child:  Center(
                    child: Platform.isAndroid
                        ? const CircularProgressIndicator(
                      strokeWidth: 1,
                    ):const CupertinoActivityIndicator(),
                  ),
                )
        ),
      );
    },
  );
}