getUser static method

UserModel? getUser()

to get user model

Implementation

static UserModel? getUser() {
  String? user = _prefsInstance?.getString("user");
  if (user != null) {
    UserModel userModel = UserModel.fromJson(json.decode(user));
    return userModel;
  } else {
    return null;
  }
}