fromValue static method

Format? fromValue(
  1. String value
)

Returns a Format enum from its string value.

Returns null if the string value is not a supported format.

Implementation

static Format? fromValue(String value) {
  for (final format in Format.values) {
    if (format.value == value) {
      return format;
    }
  }
  return null;
}