SliverBoxyChild class
A handle used by CustomBoxy widgets to change how it lays out, paints, and hit tests its children.
This class should not be instantiated directly, instead access children with BoxyDelegate.getChild.
See also:
- Inheritance
-
- Object
- InflatedChildHandle
- BaseBoxyChild
- SliverBoxyChild
Constructors
-
SliverBoxyChild({required Object id, required InflatingRenderObjectMixin<
RenderObject, InflatingParentData< parent, RenderSliver? render, Element? context, Widget? widget})RenderObject> , InflatedChildHandle> - Constructs a child associated with a parent InflatingRenderObjectMixin, this should not be used directly, instead access one with BoxyDelegate.getChild.
Properties
- context → Element
-
The Element aka BuildContext representing this child.
no setterinherited
- geometry → SliverGeometry
-
Describes the amount of space occupied by a RenderSliver.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → Object
-
The id of the child, will either be the id given by BoxyId, or an
incrementing int.
finalinherited
- isIgnored → bool
-
Whether or not this child should be ignored by paint and
BoxyChild.hitTest.
no setterinherited
- offset ↔ SliverOffset
-
The offset to this child relative to the parent, can be set during layout
or paint with position.
getter/setter pairinherited
- parentData ↔ dynamic
-
A variable that can store arbitrary data by the BoxyDelegate during
layout, may also be set by BoxyId.
getter/setter pairinherited
- rect → Rect
-
The rect of this child relative to the boxy, this is only valid after
BoxyChild.layout and position have been called.
no setterinherited
- render → RenderSliver
-
The RenderBox representing this child.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → SliverSize
-
The size of this child, should only be accessed after calling layout.
no setteroverride
- transform → Matrix4
-
The matrix transformation applied to this child, used by paint and
hitTest.
no setterinherited
Methods
-
hitTest(
{Matrix4? transform, Offset? offset, Offset? position, bool checkBounds = true}) → bool -
Hit tests this child, returns true if the hit was a success. This should
only be called in BoxyDelegate.hitTest.
override
-
ignore(
[bool value = true]) → void -
Sets whether or not this child should be ignored by paint and
BoxyChild.hitTest.
inherited
-
layout(
SliverConstraints constraints, {bool useSize = true}) → SliverGeometry - Lays out the child with the specified constraints and returns its geometry.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
paint(
{Offset? offset, Matrix4? transform}) → void -
Paints the child in the current paint context, this should only be called
in BoxyDelegate.paintChildren.
inherited
-
position(
Offset newOffset) → void -
Sets the position of this child relative to the parent, this should only
be called during layout or paint.
inherited
-
positionOnAxis(
double cross, double main) → void -
Sets the position of this child relative to the parent, this should only
be called after BoxyChild.layout is called.
inherited
-
positionRect(
Rect rect, [Alignment alignment = Alignment.center]) → void -
Position a child inside a Rect with an Alignment, this should only
be called after BoxyChild.layout.
inherited
-
setTransform(
Matrix4 newTransform) → void -
Sets the paint transform of this child, should only be called during
layout or paint.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited