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