CustomSingleChildLayoutDelegate class

A customizable SingleChildLayoutDelegate which is used by CustomSingleChildLayout or RenderCustomSingleChildLayoutBox. Here this delegate will use given function parameters as override methods.

Inheritance

Constructors

CustomSingleChildLayoutDelegate({Size sizeGetter(BoxConstraints constraints)?, BoxConstraints constraintsGetter(BoxConstraints constraints)?, Offset positionGetter(Size size, Size childSize)?, bool relayoutChecker()?})
const

Properties

constraintsGetter → (BoxConstraints Function(BoxConstraints constraints)?)
The constraints for the child given the incoming constraints.
final
hashCode int
The hash code for this object.
no setterinherited
positionGetter → (Offset Function(Size size, Size childSize)?)
The position where the child should be placed.
final
relayoutChecker → (bool Function()?)
The checker function to determine whether new instance is different from the old one.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sizeGetter → (Size Function(BoxConstraints constraints)?)
The size of this object given the incoming constraints.
final

Methods

getConstraintsForChild(BoxConstraints constraints) BoxConstraints
The constraints for the child given the incoming constraints.
override
getPositionForChild(Size size, Size childSize) Offset
The position where the child should be placed.
override
getSize(BoxConstraints constraints) Size
The size of this object given the incoming constraints.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldRelayout(covariant CustomSingleChildLayoutDelegate oldDelegate) bool
Called whenever a new instance of the custom layout delegate class is provided to the RenderCustomSingleChildLayoutBox object, or any time that a new CustomSingleChildLayout object is created with a new instance of the custom layout delegate class (which amounts to the same thing, because the latter is implemented in terms of the former).
override
toString() String
A string representation of this object.
inherited

Operators

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