signOut static method

Future<void> signOut()

Signs out: clears storage and files but keeps the language and theme. await UAuth.signOut(); UNavigator.offAll(LoginPage())

Implementation

static Future<void> signOut() async {
  final String? locale = ULocalStorage.getLocale();
  final bool isDarkMode = ULocalStorage.isDarkMode();
  await ULocalStorage.clear();
  await UFileStorage.clear();
  if (locale != null) ULocalStorage.setLocale(locale);
  ULocalStorage.setDarkMode(isDarkMode);
  _authFailureHandled = false;
  _epoch++;
}