show method

void show({
  1. String? text,
})

Implementation

void show({String? text}) {
  if (!_showing) {
    _showing = true;
    AtEventNotificationListener()
        .navKey!
        .currentState!
        .push(CustomPopupRoutes(
            pageBuilder: (_, __, ___) {
              print('building loader');
              return Center(
                child: (text != null)
                    ? Row(
                        mainAxisAlignment: MainAxisAlignment.center,
                        children: [
                          Flexible(
                            child: Text(
                              text,
                              textScaleFactor: 1,
                              style: TextStyle(
                                  color: AllColors().MILD_GREY,
                                  fontSize: 20.toFont,
                                  fontWeight: FontWeight.w400,
                                  decoration: TextDecoration.none),
                            ),
                          ),
                          TypingIndicator(
                            showIndicator: true,
                            flashingCircleBrightColor: AllColors().LIGHT_GREY,
                            flashingCircleDarkColor: AllColors().DARK_GREY,
                          ),
                        ],
                      )
                    : CircularProgressIndicator(),
              );
            },
            barrierDismissible: false))
        .then((_) {});
  }
}