getContent method

Future<GetContentResult> getContent()

Gets the content of the resource. returns A function that receives resource content when the request completes.

Implementation

Future<GetContentResult> getContent() {
  var $completer = Completer<GetContentResult>();
  _wrapped.getContent((
    String content,
    String encoding,
  ) {
    if (checkRuntimeLastError($completer)) {
      $completer.complete(GetContentResult(
        content: content,
        encoding: encoding,
      ));
    }
  }.toJS);
  return $completer.future;
}