fromAsset method
asset
- path of the file to be loaded
package
- if the file is from another flutter package add the name of the package here
Implementation
@override
Future<GLTFData?> fromAsset(String asset, {String? package}) async{
_init();
if(path == ''){
setPath(asset.replaceAll(asset.split('/').last, ''));
}
ThreeFile? tf = await _loader.fromAsset(asset,package: package);
return tf == null?null:_parse(tf.data);
}