load method

  1. @override
Future<String> load(
  1. String relativePath
)
override

Loads an asset from the configured package as a string.

relativePath - Path relative to the package root

Returns the file content as a string. Throws BundlerException if the asset cannot be found or loaded.

Implementation

@override
Future<String> load(String relativePath) async {
  try {
    return await _manager.loadAsset(relativePath);
  } catch (e) {
    throw AssetLoaderException('Failed to load asset: $relativePath', relativePath, cause: e);
  }
}