ChannelType.parse constructor

ChannelType.parse(
  1. 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),
    );