byEnum<T, E> method

T? byEnum<T, E>(
  1. String key,
  2. T onModel(
    1. String? value
    )
)

Implementation

T? byEnum<T, E>(String key, T Function(String? value) onModel) {
  if (this[key] == null) return null;
  return onModel.call(this[key]?.toString());
}