withUrl method
Configures the HubConnection to use HTTP-based transports to connect to the specified URL.
Implementation
// ignore: avoid_returning_this
HubConnectionBuilder withUrl(String url, [dynamic transportTypeOrOptions]) {
_url = url;
if (transportTypeOrOptions != null) {
if (transportTypeOrOptions is HttpConnectionOptions) {
_httpConnectionOptions = transportTypeOrOptions;
} else if (transportTypeOrOptions is HttpTransportType) {
_httpTransportType = transportTypeOrOptions;
}
}
return this;
}