onConnect method

void onConnect(
  1. dynamic handler(
    1. dynamic data
    )
)

listen to on connect event

Implementation

void onConnect(Function(dynamic data) handler) {}