fromString static method

LightMode fromString(
  1. String value
)

Get a LightMode from a given string value.

Implementation

static LightMode fromString(String value) {
  return values.firstWhere(
    (mode) => mode.value == value,
    orElse: () => normal,
  );
}