annotateText method

  1. @override
Future<AnnotateTextResponse> annotateText(
  1. AnnotateTextRequest request
)
override

A convenience method that provides all features in one call.

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

  if (_annotateText case final annotateText?) {
    return annotateText(request);
  }
  throw UnsupportedError('annotateText');
}