asObject<D> function

D? asObject<D>(
  1. NUIEntMapper<D> entity,
  2. dynamic value
)

Implementation

D? asObject<D>(NUIEntMapper<D> entity, dynamic value){
  if(value == null) return null;
  if(value is Map){
    return entity.toEntity(value as Map<String, dynamic>);
  }
  return entity.toEntity(jsonDecode(value));
}