completeTrial method

  1. @override
Future<Trial> completeTrial(
  1. CompleteTrialRequest request
)
override

Marks a Trial as complete.

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> completeTrial(CompleteTrialRequest request) async {
  if (isClosed) throw StateError('Service is closed');

  if (_completeTrial case final completeTrial?) {
    return completeTrial(request);
  }
  throw UnsupportedError('completeTrial');
}