AssetPublishLoader class
A PublishLoader over a bundle shipped as an asset (.json or
.json.gz): runs offline. Loaded once.
The site's files (PublishAssetSource) are assets beside it: a bundle
at assets/site/bundle.json reads fonts/Inter.ttf from the asset
assets/site/fonts/Inter.ttf (list them in the app's pubspec).
- Implemented types
Constructors
- AssetPublishLoader(String asset, {AssetBundle? bundle})
Properties
- asset → String
-
final
-
bundle
→ Future<
PublishBundle> -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
assetUrl(
String path) → Uri? -
Where file
pathis served, when it has a URL (an image is then loaded from there, cached by the platform); null when it is read as bytes only (loadAsset).override -
loadAsset(
String path) → Future< Uint8List> -
The bytes of file
path; throws PublishLoadException when there is no such file.override -
loadComponent(
PublishSource source, String type) → Future< PublishComponent> -
Component
type(a type name the model'scomponentslists): the definition stored at PublishSource.componentPath. Throws a PublishLoadException when there is none.override -
loadLayout(
PublishSource source, String layoutId) → Future< PublishLayout> -
Layout
layoutId(a layout id the model lists).override -
loadModel(
PublishSource source) → Future< PublishModel> -
The project's publish model.
override
-
loadPlugin(
String id, int version) → Future< PluginVersion?> -
The plugin versions the bundle embeds.
override
-
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