BuildOp class Null safety

A building operation to customize how a DOM element is rendered.

Annotations

Constructors

BuildOp({Map<String, String> defaultStyles(Element element)?, void onChild(BuildMetadata childMeta)?, void onTree(BuildMetadata meta, BuildTree tree)?, void onTreeFlattening(BuildMetadata meta, BuildTree tree)?, Iterable<Widget>? onWidgets(BuildMetadata meta, Iterable<WidgetPlaceholder> widgets)?, bool onWidgetsIsOptional = false, int priority = 10})
Creates a build op.
const

Properties

defaultStyles → (Map<String, String> Function?(Element element)?)
The callback that should return default styling map. [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
onChild → (void Function?(BuildMetadata childMeta)?)
The callback that will be called whenver a child element is found. [...]
final
onTree → (void Function?(BuildMetadata meta, BuildTree tree)?)
The callback that will be called when child elements have been processed.
final
onTreeFlattening → (void Function?(BuildMetadata meta, BuildTree tree)?)
The callback that will be called before flattening.
final
onWidgets → (Iterable<Widget>? Function?(BuildMetadata meta, Iterable<WidgetPlaceholder> widgets)?)
The callback that will be called when child elements have been built. [...]
final
onWidgetsIsOptional bool
Controls whether the element should be forced to be rendered as block. [...]
final
priority int
The execution priority, op with lower priority will run first. [...]
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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

Constants

kPriorityMax → const int
The recommended maximum value for priority. [...]
9007199254740991