BootstrapAdapter class
Integrates MetaMantle static rendering with Flutter's web bootstrap pipeline.
Constructors
- BootstrapAdapter()
-
const
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
-
buildPrerenderBootstrapHtml(
{required String templateHtml, required WebMetadata metadata, required String semanticHtml, required BuildMode mode, RenderingStrategy renderingStrategy = RenderingStrategy.flutterCanvas, String baseHref = '/', MetadataRenderer metadataRenderer = const MetadataRenderer(), MetaMantleConfig config = const MetaMantleConfig()}) → String -
Synthesizes complete prerender HTML by injecting head metadata, prerender CSS,
semantic content container, and client coordination scripts into
templateHtml. -
findCustomBootstrapTemplate(
Directory projectDir) → Future< File?> -
Inspects the project for an existing custom
web/flutter_bootstrap.jstemplate. -
generateClientHandshakeScript(
) → String -
Generates the client startup coordination script for Mode C (BuildMode.hybrid).
Coordinated snapshot removal occurs strictly when the application signals readiness
via
window.__mantleClientReady(or MetaMantle.markReady()), without arbitrary timeouts. Also protects the static snapshot if an unhandled runtime error occurs before ready. -
generateIslandBootstrapScript(
) → String - Generates the scoped island startup script for Strategy C (RenderingStrategy.domWithFlutterIslands). Scopes Flutter engine and canvas mounting strictly inside designated island container(s).
-
generatePrerenderStyles(
) → String - Injects prerender CSS styles into the document head.
-
generateSemanticDomClientScript(
) → String - Generates client interaction bridge script for Strategy B (RenderingStrategy.semanticDom).
-
isValidBootstrapTemplate(
String content) → bool - Verifies that a bootstrap file contains required Flutter template tokens if applicable.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
wrapPrerenderContent(
String htmlContent, {required BuildMode mode, RenderingStrategy renderingStrategy = RenderingStrategy.flutterCanvas}) → String - Wraps generated semantic HTML content in the standard prerender root container.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited