configure method

void configure(
  1. String url,
  2. String deviceid,
  3. String appSecret
)

Implementation

void configure(String url, String deviceid, String appSecret) {
  var uri = Uri.parse(url);
  this.appSecret = appSecret;
  var platform =
      defaultTargetPlatform.toString().replaceAll('TargetPlatform.', '');
  _webSocketUrl =
      '${uri.scheme.toLowerCase() == 'http' ? 'ws' : 'wss'}://${uri.host}:${uri.port}${uri.path}/channel/$platform/$deviceid';
  client = WebSocketClient(_webSocketUrl,
      provider: this, headers: {'Canary-App-Secret': appSecret});
}