FmatMaterialRegistry class final

Resolves and loads .fmat materials registered through DataAssets.

Materials are keyed by their .fmat source path relative to the owning package's root, so two materials that share a name in different directories do not collide.

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

loadMaterial(String sourcePath, {String? package, String? bundleName}) Future<PreprocessedMaterial>
Loads the material whose source is sourcePath as a PreprocessedMaterial.
loadSky(String sourcePath, {String? package, String? bundleName}) Future<PreprocessedSky>
Loads the sky whose source is sourcePath as a PreprocessedSky.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve(String sourcePath, {String? package, String? bundleName}) → FmatMaterialResolution
Resolves sourcePath (the .fmat source path relative to the owning package's root, with or without the .fmat extension) to exactly one generated bundle/index entry.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

isFmatIndexAssetKey(String assetKey) bool
Returns true when assetKey is a generated .fmat DataAssets index.
load({AssetBundle? bundle, Iterable<String>? assetKeys}) Future<FmatMaterialRegistry>
Loads all generated flutter_scene .fmat DataAssets indexes.