addTextFile method

void addTextFile (
  1. String name,
  2. String url
)

Implementation

void addTextFile(String name, String url) {
  var loader =
      HttpRequest.getString(url).then((text) => text, onError: (error) {
    throw StateError('Failed to load text file.');
  });
  _addResource('TextFile', name, url, loader);
}