PhoenixChannelEvent constructor Null safety

PhoenixChannelEvent(
  1. String value
)

Instantiates a PhoenixChannelEvent from one of the values used in the wire protocol.

Implementation

factory PhoenixChannelEvent(String value) {
  switch (value) {
    case __closeEventName:
      return close;
    case __errorEventName:
      return error;
    case __joinEventName:
      return join;
    case __replyEventName:
      return reply;
    case __leaveEventName:
      return leave;
    default:
      throw ArgumentError.value(value);
  }
}