fromStringToEnum static method

FieldName fromStringToEnum(
  1. String field
)

String to FieldName

Implementation

static FieldName fromStringToEnum(String field) {
  return FieldName.values.firstWhere((e) => e.toString() == field);
}