addTrialMeasurement method

  1. @override
Future<Trial> addTrialMeasurement(
  1. AddTrialMeasurementRequest request
)
override

Adds a measurement of the objective metrics to a Trial. This measurement is assumed to have been taken before the Trial is 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> addTrialMeasurement(AddTrialMeasurementRequest request) async {
  if (isClosed) throw StateError('Service is closed');

  if (_addTrialMeasurement case final addTrialMeasurement?) {
    return addTrialMeasurement(request);
  }
  throw UnsupportedError('addTrialMeasurement');
}