Defines a contract for classes that build Asset instances from a given template identifier.
An AssetBuilder is responsible for transforming a template string or path into an actual Asset representation used by the system.
Usage Example
final builder = DefaultAssetBuilder();
final asset = builder.build('templates/main.html');
Design Notes
- Implementations should provide a deterministic
buildmethod returning an Asset instance. - Can be extended or replaced with custom asset resolution strategies.
- Mixed-in types
Constructors
- AssetBuilder([AssetLoaderInterface? assetLoader])
-
Defines a contract for classes that build Asset instances from a
given template identifier.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
String template) → AssetPathResource -
Builds an Asset based on the provided
templateidentifier. -
equalizedProperties(
) → List< Object?> -
Mixin-style contract for value-based equality,
hashCode, andtoString.inherited -
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