ChannelType.parse constructor
ChannelType.parse(
- int value
Parse a ChannelType from a value
.
The value
must be a valid channel type.
Implementation
factory ChannelType.parse(int value) => ChannelType.values.firstWhere(
(type) => type.value == value,
orElse: () => throw FormatException('Unknown channel type', value),
);