load method

dynamic load(
  1. dynamic url,
  2. Function onLoad, [
  3. Function? onProgress,
  4. Function? onError,
])
override

Implementation

load(url, Function onLoad, [Function? onProgress, Function? onError]) async {
  var loader = new FileLoader(this.manager);
  loader.setPath(this.path);
  loader.setResponseType('text');
  final data = await loader.load(url, (text) {
    // try {
    if (onLoad != null) {
      onLoad(this.parse(text));
    }
    // } catch ( e ) {

    // 	if ( onError != null ) {

    // 		onError( e );

    // 	} else {

    // 		print( e );

    // 	}

    // 	this.manager.itemError( url );

    // }
  }, onProgress, onError);

  return data;
}