logoutFromSDK method

dynamic logoutFromSDK()

Implementation

logoutFromSDK() async {
  if (await AppUtils.isNetConnected()) {
    DialogUtils.progressLoading();
    Mirrorfly.logoutOfChatSDK(flyCallBack: (response) {
      DialogUtils.hideLoading();
      if (response.isSuccess) {
        // clearAllPreferences();
      } else {
        toToast(getTranslated("logoutFailed"));
        // Get.snackbar("Logout", "Logout Failed");
      }
    }) /*.catchError((er) {
      DialogUtils.hideLoading();
      SessionManagement.clear().then((value) {
        // SessionManagement.setToken(token);
        NavUtils.offAllNamed(Routes.login);
      });
    })*/
        ;
  } else {
    toToast(getTranslated("noInternetConnection"));
  }
}