createStudy method

  1. @override
Future<Study> createStudy(
  1. CreateStudyRequest request
)
override

Creates a Study. A resource name will be generated after creation of the Study.

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

  if (_createStudy case final createStudy?) {
    return createStudy(request);
  }
  throw UnsupportedError('createStudy');
}