getObject<T extends NUIEnt> method
Implementation
Future<T?> getObject<T extends NUIEnt>(String key, NUIEntMapper<T> entity) async{
SharedPreferences pref = _pref!;
try{
String? value = pref.getString(key);
if(isNullOrEmpty(value)){
return null;
}
return entity.toEntity(jsonDecode(value!));
}catch(e){
log("NUISharedPref -> Failed to decode object ${entity.entityName()}");
return null;
}
}