fromValue static method

LightType fromValue(
  1. int value
)

Returns the LightType for the given native value.

Throws ArgumentError if value does not correspond to a known entry.

Implementation

static LightType fromValue(int value) => switch (value) {
  0 => LIGHT_DIRECTIONAL,
  1 => LIGHT_POINT,
  _ => throw ArgumentError('Unknown value for $LightType: $value'),
};