fromString static method

ErrorSeverity fromString(
  1. String? value
)

Implementation

static ErrorSeverity fromString(String? value) {
  return switch (value) {
    'error' => ErrorSeverity.ERROR,
    'info' => ErrorSeverity.INFO,
    'warning' => ErrorSeverity.WARNING,
    String() => ErrorSeverity.ERROR,
    null => ErrorSeverity.ERROR,
  };
}