loginOut static method

dynamic loginOut([
  1. dynamic isLogin = false
])

Implementation

static loginOut([isLogin = false]) {
  FastCache(FastActions.isLogin()).value = isLogin;
  FastNotification.push(FastActions.isLogin(), isLogin);
  if (isLogin) {
    storeString(FastActions.isLogin(), '1');
  } else {
    storeString(FastActions.isLogin(), '0');
    popToRootPage();
    FastNotification.push(FastActions.toTabBar(), 0);
  }
  if (!isLogin) {
    FastApp.reCoverEnvironment();
  }
}