getUserProperty static method

dynamic getUserProperty(
  1. dynamic user,
  2. String property
)

Implementation

static dynamic getUserProperty(dynamic user, String property){
  try {
    var result = storage.read("${user.id}_$property")!;

    if(result == null) {
      return null;
    }
    else if(result is CoffeeModel) {
      return result;
    }

    return result;
  }
  catch (err) {
    return null;
  }
}