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