AssetLoaderInterface class abstract

Abstract interface for asset bundling operations.

This interface defines the contract for loading assets from packages, providing a consistent API for different bundler implementations.

Implementations should handle:

  • Loading assets from package resources
  • Caching for performance optimization
  • Error handling with appropriate exceptions
  • Package resolution across different deployment scenarios

Constructors

AssetLoaderInterface()

Properties

hashCode int
The hash code for this object.
no setterinherited
packageName String
Gets the configured package name.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearCache() → void
Clears the internal cache.
exists(String relativePath) Future<bool>
Checks if an asset exists without loading it.
getPackageRoot() Future<String?>
Gets the package root path for debugging purposes.
load(String relativePath) Future<String>
Loads an asset from the configured package as a string.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited