renameTorrent method Null safety

Future<void> renameTorrent(
  1. int id,
  2. {String? name,
  3. String? path}
)

Rename torrent by given id id of the torrent to rename name new name path old name Throws TransmissionException if errors

Implementation

Future<void> renameTorrent(
  int id, {
  String? name,
  String? path,
}) async {
  final results = await _dio.post('/',
      data: _Request(methodRenameTorrent, arguments: {
        'ids': id,
        if (path != null) 'path': path,
        if (name != null) 'name': name,
      }).toJSON());
  _checkResults(_Response.fromJSON(results.data));
}