fromConfigurationValue static method

UiModeType fromConfigurationValue(
  1. int value
)

Resolves a raw configuration value; unknown values fall back to normal.

Implementation

static UiModeType fromConfigurationValue(int value) {
  for (final type in UiModeType.values) {
    if (type.configValue == value) return type;
  }
  return UiModeType.normal;
}