convertStringToChannelType method Null safety

ChannelType? convertStringToChannelType(
  1. String type
)

Converts a string channel type to the corresponding ChannelType enum.

Returns null if it is does not exist, otherwise returns ChannelType

Implementation

static ChannelType? convertStringToChannelType(String type) => EnumToString.fromString(ChannelType.values, type);