PanelController class

A controller that controls the SlidingPanel programmatically.

Attaching the same controller to different panels would simply control the latest attached panel only.

Constructors

PanelController()

Properties

controlling bool
A flag that indicates whether this controller is actively controlling a SlidingPanel.
no setter
currentPosition double
Get current position of the panel.
no setter
currentState PanelState
Returns the current PanelState of the panel.
no setter
hashCode int
The hash code for this object.
no setterinherited
panel ↔ _SlidingPanelState?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollData PanelScrollData
Contains ScrollController used by the panel and also contains some useful properties to use that controller.
no setter
sizeData PanelSizeData
Get the PanelSize parameters of the current panel.
no setter

Methods

close() Future<Null>
Bring the panel to PanelState.closed.
collapse() Future<Null>
Bring the panel to PanelState.collapsed, if this is not a Two-state panel.
dismiss() Future<Null>
Used to dismiss the panel. No matter how much PanelSize.closedHeight is given, by calling this, the panel gets completely hidden as if you gave it a PanelSize.closedHeight to 0.0.
expand() Future<Null>
Bring the panel to PanelState.expanded.
getPercentToPanelPosition(double percent, {bool forDismissed = false}) double
Get Panel's height between PanelSize.closedHeight and PanelSize.expandedHeight, given specific percent between 0.0 and 1.0.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
percentPosition(double min, double max) double
Get Panel's current position as percentage between 0.0 and 1.0, given minimum and maximum positions.
popWithResult({dynamic result, bool shouldCloseOnly = false}) Future<Null>
Dismisses this panel and then triggers a Notification with given result.
popWithThrowResult({dynamic result, bool shouldCloseOnly = false}) Future<Null>
Dismisses this panel and then sends the result back to the SlidingPanel.onThrowResult.
rebuild({VoidCallback? then}) → void
Re-calculates the panel's size forcefully when using PanelAutoSizing.
sendResult({dynamic result}) → void
Triggers a Notification with given result, without changing panel state.
setAnimatedPanelPosition(double value) Future<Null>
Set panel position WITH animation.
setPanelPosition(double value) → void
Set panel position WITHOUT animation.
throwResult({dynamic result}) → void
Sends the result back to the SlidingPanel.onThrowResult.
toString() String
A string representation of this object.
inherited

Operators

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