stopTrial method

  1. @override
Future<Trial> stopTrial(
  1. StopTrialRequest request
)
override

Stops a Trial.

Throws a http.ClientException if there were problems communicating with the API service. Throws a ServiceException if the API method failed for any reason.

Implementation

@override
Future<Trial> stopTrial(StopTrialRequest request) async {
  if (isClosed) throw StateError('Service is closed');

  if (_stopTrial case final stopTrial?) {
    return stopTrial(request);
  }
  throw UnsupportedError('stopTrial');
}