PublishBundle class final
A publish model with its layouts and components in one piece: what a slug serves, an app bundles as an asset to run offline.
JSON: {"schema": 3, "model": {...}, "layouts": {"id": {...}}, "components": {"PlanCard": {...}}}, each component as stored at
PublishSource.componentPath (PublishComponent).
- Available extensions
- Annotations
-
- @immutable
Constructors
-
PublishBundle({required PublishModel model, Map<
String, PublishLayout> layouts = const {}, Map<String, PublishComponent> components = const {}, Json extra = const {}}) -
const
Properties
-
components
→ Map<
String, PublishComponent> -
The published component definitions, by type name.
final
- extra → Json
-
Keys this version doesn't model, kept (the managed library's embedded
plugin versions,
plugins).final - hashCode → int
-
The hash code for this object.
no setterinherited
-
layouts
→ Map<
String, PublishLayout> -
final
- model → PublishModel
-
final
-
pluginVersions
→ List<
PluginVersion> -
Available on PublishBundle, provided by the PublishBundlePlugins extension
no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Json -
toString(
) → String -
A string representation of this object.
inherited
-
withPluginVersions(
List< PluginVersion> versions) → PublishBundle -
Available on PublishBundle, provided by the PublishBundlePlugins extension
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromJson(
Object? json, {Catalog? catalog}) → PublishBundle -
Its layouts and components decode with
catalog(default:Catalog.current). A bundle with aschemaother than kPublishSchemaVersion is refused (UnsupportedSchemaException), as is its model or a layout of another schema (a bundle may leave its ownschemaout: its model and layouts carry theirs).