DOMContext<T> class

Represents the context of this DOM tree.

Used by DOMGenerator to configure some behaviors, like CSS unit conversion.

Implementers

Constructors

DOMContext({DOMContext<T>? parent, Viewport? viewport, bool resolveCSSViewportUnit = false, bool resolveCSSURL = false, Map<String, dynamic>? variables, IntlMessageResolver? intlMessageResolver})

Properties

cssURLResolver String Function(String? url)?
The resolver Function for CSSURL.
getter/setter pair
domGenerator DOMGenerator<T>?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
intlMessageResolver IntlMessageResolver?
getter/setter pair
namedElementAttribute String
getter/setter pair
namedElementProvider NamedElementGenerator?
getter/setter pair
onPreElementCreated ↔ void Function(DOMTreeMap<T> treeMap, DOMNode domElement, T element, DOMContext<T> context)?
getter/setter pair
parent DOMContext<T>?
final
preFinalizeGeneratedTree ↔ void Function(DOMTreeMap<T> treeMap)?
getter/setter pair
resolveCSSURL bool
If true will resolve any CSSURL when generating a DOM tree.
getter/setter pair
resolveCSSViewportUnit bool
If true will resolve any viewport CSSUnit to px when generating a DOM tree.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
variables Map<String, dynamic>
getter/setter pair
viewport Viewport?
The Viewport of this context.
getter/setter pair

Methods

copy() DOMContext<T>
Creates a copy of this instance.
getNamedElementNameValue(DOMElement domElement) String?
getVariable(String key, Object? value) → dynamic
hasNamedElementNameValue(DOMElement domElement) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
putVariable(String key, Object? value) → void
resolveCSSUnitValue(num value, CSSUnit unit) String
Resolves a CSSUnit value to a String
resolveCSSURLValue(String? url) String?
Resolves a CSSURL value
resolveCSSViewportUnitValue(num value, CSSUnit unit, {bool originalValueAsComment = true}) String
Resolves a Viewport CSSUnit (vw, vh, vmin, vmax) value to a px value as String.
resolveIntlMessage(String key, [Map<String, dynamic>? parameters]) String?
resolveNamedElement(DOMElement? domParent, T? parent, DOMElement domElement, DOMTreeMap<T> treeMap) → T?
resolveSource(String url) String
resolveViewportCSSLength(num value, CSSUnit unit) CSSLength
toString() String
A string representation of this object.
override

Operators

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

Static Properties

defaultNamedElementAttribute String
final