BoxBoxyDelegateMixin<LayoutData extends Object, ChildHandleType extends BaseBoxyChild> mixin
Mixin for the logic shared by BoxBoxyDelegate and BoxyDelegate.
This mixin should typically not be used directly, instead consider extending one of the above classes.
- Superclass constraints
- BaseBoxyDelegate<
LayoutData, ChildHandleType>
- BaseBoxyDelegate<
- Mixin applications
Properties
- buildContext → BuildContext
-
Gets the BuildContext of this boxy.
no setterinherited
- canvas → Canvas
-
The current canvas, should only be accessed from paint methods.
no setterinherited
-
children
→ List<
ChildHandleType> -
A list of each BoxyChild handle associated with the boxy, the list
itself should not be modified by the delegate.
no setterinherited
- constraints → BoxConstraints
-
The most recent constraints given to this boxy by its parent.
no setteroverride
- debugPhase → BoxyDelegatePhase
-
The current phase in the render pipeline that this boxy is performing,
only valid in debug mode.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hitTestResult → BoxHitTestResult
-
The current hit test result, should only be accessed from hitTest.
no setteroverride
- indexedChildCount → int
-
The number of children that have not been given a BoxyId, this
guarantees there are child ids between 0 (inclusive) and indexedChildCount
(exclusive).
no setterinherited
- isDryLayout → bool
-
Whether or not this boxy is performing a dry layout.
no setter
- layers → BoxyLayerContext
-
The current layer context, useful for pushing Layers to the scene during
paintChildren.
no setterinherited
- layoutData ↔ LayoutData?
-
A variable to hold additional data created during layout which can be
used while painting and hit testing.
getter/setter pairinherited
- needsCompositing → bool
-
Override this method to return true if the paint method will push one or
more layers to paintingContext.
no setterinherited
- paintingContext → PaintingContext
-
The current painting context, should only be accessed from paint methods.
no setterinherited
- paintOffset → Offset
-
The offset of the current paint context.
no setterinherited
-
render
→ RenderBoxy<
ChildHandleType> -
The RenderBoxyMixin of the current context.
no setteroverride
- renderSize → Size
-
The last size returned by layout.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addHit(
) → void -
Adds the boxy to hitTestResult, this should typically be called from
hitTest when a hit succeeds.
override
-
distanceToBaseline(
TextBaseline baseline) → double? - Override to return the distance from the y-coordinate of the position of the box to the y-coordinate of the first given baseline in the box's contents, if any, or null otherwise.
-
getChild<
T extends ChildHandleType> (Object id) → T -
Gets the child handle with the specified
id
.inherited -
getChildOrNull<
T extends ChildHandleType> (Object id) → T? -
Gets the child handle with the specified
id
or returns null if there is no child with givenid
.inherited -
hasChild(
Object id) → bool -
Returns true if a child exists with the specified
id
.inherited -
hitTest(
SliverOffset position) → bool -
Override this method to change how the boxy gets hit tested.
inherited
-
inflate<
T extends ChildHandleType> (Widget widget, {Object? id}) → T -
Dynamically inflates a widget as a child of this boxy, should only be
called in BoxyChild.layout.
inherited
-
layout(
) → Size - Override this method to lay out children and return the final size of the boxy.
-
maxIntrinsicHeight(
double width) → double - Override to change the maximum height that this box could be without failing to correctly paint its contents within itself, without clipping.
-
maxIntrinsicWidth(
double height) → double - Override to change the maximum width that this box could be without failing to correctly paint its contents within itself, without clipping.
-
minIntrinsicHeight(
double width) → double - Override to change the minimum height that this box could be without failing to correctly paint its contents within itself, without clipping.
-
minIntrinsicWidth(
double height) → double - Override to change the minimum width that this box could be without failing to correctly paint its contents within itself, without clipping.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onPointerEvent(
PointerEvent event, covariant BoxHitTestEntry entry) → void -
Override to handle pointer events that hit this boxy.
override
-
paint(
) → void -
Override this method to paint below children.
inherited
-
paintChildren(
) → void -
Override this method to change how children get painted.
inherited
-
paintForeground(
) → void -
Override this method to paint above children.
inherited
-
paintLayer(
ContainerLayer layer, {VoidCallback? painter, Offset? offset, Rect? debugBounds}) → void -
Paints a ContainerLayer compositing layer in the current painting
context with an optional
painter
callback, this should only be called in paintChildren.inherited -
shouldRelayout(
covariant BaseBoxyDelegate< Object, BaseBoxyChild> oldDelegate) → bool -
Override this method to return true when the children need to be
laid out.
inherited
-
shouldRepaint(
covariant BaseBoxyDelegate< Object, BaseBoxyChild> oldDelegate) → bool -
Override this method to return true when the children need to be
repainted.
inherited
-
toString(
) → String -
Override this method to include additional information in the
debugging data printed by debugDumpRenderTree and friends.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited