getScreenshot method

  1. @override
Future<Screenshot> getScreenshot(
  1. GetScreenshotInstanceRequest request
)
override

Returns the screenshot from the specified instance.

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

  if (_getScreenshot case final getScreenshot?) {
    return getScreenshot(request);
  }
  throw UnsupportedError('getScreenshot');
}