PhoenixLink constructor Null safety

PhoenixLink(
  1. {required PhoenixChannel channel,
  2. ResponseParser parser = const ResponseParser(),
  3. RequestSerializer serializer = const RequestSerializer()}
)

create a new PhoenixLink using an established PhoenixChannel channel. You can use the static createChannel method to create a PhoenixChannel from a websocket URI and optional parameters (e.g. for authentication)

Implementation

PhoenixLink(
    {required PhoenixChannel channel,
    ResponseParser parser = const ResponseParser(),
    RequestSerializer serializer = const RequestSerializer()})
    : channel = channel,
      _serializer = serializer,
      _parser = parser;