Transmission constructor Null safety

Transmission(
  1. {String? baseUrl,
  2. String? proxyUrl,
  3. bool enableLog = false}
)

Documentation about the API at https://github.com/transmission/transmission/blob/master/extras/rpc-spec.txt baseUrl url of the transmission server instance, default to http://localhost:9091/transmission/rpc proxyUrl url use as a proxy, urls will be added at the end before request, default to null enableLog boolean to show http logs or not

Implementation

factory Transmission(
    {String? baseUrl, String? proxyUrl, bool enableLog = false}) {
  baseUrl ??= 'http://localhost:9091/transmission/rpc';
  return Transmission._(
      Dio(BaseOptions(
          baseUrl: proxyUrl == null
              ? baseUrl
              : proxyUrl + Uri.encodeComponent(baseUrl))),
      proxyUrl != null,
      enableLog);
}