userLoggedIn static method
If the user is logged in.
- Returns a Future that completes with a bool that represents if the user is logged in.
Implementation
static Future<bool> userLoggedIn() async {
SharedPreferences prefs = await SharedPreferences.getInstance();
bool loggedIn = prefs.getBool(_loggedInKey()) ?? false;
return loggedIn;
}