setUser static method
to set user model
Implementation
static Future<bool> setUser({UserModel? userModel}) async {
if (userModel != null) {
String user = json.encode(userModel);
return await _prefsInstance?.setString("user", user) ?? true;
} else {
return await _prefsInstance?.remove("user") ?? true;
}
}