PanelSnapping enum
Apply snapping effect to panel while opening / closing.
i.e., If the user is swiping the panel and leaves panel in any position between PanelState.closed and PanelState.expanded, it will be animated to the NEAREST PanelState.
For two-state panels, PanelState.collapsed is not used.
Default : disabled
Constructors
- PanelSnapping()
-
const
Values
- disabled → const PanelSnapping
-
Don't snap the panel to the nearest position when user leaves the panel.
- enabled → const PanelSnapping
-
Bring the panel to the nearest position when the user leaves the panel. More precisely, when user drags the panel in a direction and leaves, the panel moves to NEXT PanelState, which seems to be the nearest one to current position.
Note that, snap is ONLY applied, when dragging stops with a non-zero velocity. It means, if user stops dragging AFTER keeping panel idle under finger for one second, snapping will NOT be applied.
- forced → const PanelSnapping
-
Same as enabled, but snapping is applied, even with zero dragging velocity. So, if user keeps the panel held for some time and then leaves, panel will still snap.
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent 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
-
values
→ const List<
PanelSnapping> - A constant List of the values in this enum, in order of their declaration.