LayoutSize class

the layout result of RenderSLidable size is the size of SlidablePanel.child hasPreAction indicates whether there has SlideActionPanel at ActionPosition.pre hasPostAction indicates whether there has SlideActionPanel at ActionPosition.post

Constructors

LayoutSize({required Size size, required bool hasPreAction, required bool hasPostAction, required Axis axis, required double maxSlideThreshold})
const

Properties

axis Axis
final
hashCode int
The hash code for this object.
no setteroverride
hasPostAction bool
final
hasPreAction bool
final
maxSlideThreshold double
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size Size
final

Methods

getDragExtent(double ratio) double
calculate the final drag extent after animating ends so that the next dragging could start from the previous drag extent
getOpenTarget(ActionPosition position) double?
calculate the target ratio when we want to open the panel at position if there is no SlideActionPanel at position, return null
getRatio(double dragExtent) double?
if no SlideActionPanel, return null by doing so, we could disable sliding if no actions along the axis the ratio would be calculated: dragExtent / slidable space along the axis the slidable space is calculated by maxSlideThreshold * the space along the axis
getToggleTarget(SlideDirection direction, double ratio, bool isForward) double
according to direction, ratio and isForward calculate the target ratio when we should continue to slide after dragging ends
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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