SlidingPanel class Null safety

SlidingPanel

Inheritance

Constructors

SlidingPanel({Key? key, InitialPanelState initialState = InitialPanelState.closed, bool animatedAppearing = false, required PanelContent content, PanelSize size = const PanelSize(), PanelMaxWidth maxWidth = const PanelMaxWidth(), PanelDecoration decoration = const PanelDecoration(), BackdropConfig backdropConfig = const BackdropConfig(), required PanelController panelController, PanelAutoSizing autoSizing = const PanelAutoSizing(), bool renderPanelBackground = true, PanelSnapping snapping = PanelSnapping.disabled, double snappingTriggerPercentage = 0.0, bool isDraggable = true, ScrollPhysics? physics, double parallaxSlideAmount = 0.2, double dragMultiplier = 1.0, Duration duration = const Duration(milliseconds: 1000), Curve curve = Curves.fastOutSlowIn, bool isTwoStatePanel = false, BackPressBehavior backPressBehavior = BackPressBehavior.POP, PanelPoppingBehavior panelPoppingBehavior = PanelPoppingBehavior.POP_AFTER_TAP, PanelClosedOptions panelClosedOptions = const PanelClosedOptions(), SafeAreaConfig safeAreaConfig = const SafeAreaConfig.all(), void onPanelSlide(double position)?, void onPanelStateChanged(PanelState state)?, void onThrowResult(dynamic result)?})
const

Properties

animatedAppearing bool
If true, the panel is created (instantiated) with PanelState.dismissed. After initialization is completed, the panel animates to given initialState.
final
autoSizing PanelAutoSizing
If provided, the panel's height will be automatically calculated based on the content.
final
backdropConfig BackdropConfig
Various configurations related to making SlidingPanel look and act like a backdrop widget.
final
backPressBehavior BackPressBehavior
This decides the action to be taken when user presses the back button.
final
content PanelContent
The content to be displayed in the panel.
final
curve Curve
The curve to be used in animations.
final
decoration PanelDecoration
The decoration to be applied on the PanelContent.
final
dragMultiplier double
A multiplier applied at every user gesture for sliding the panel.
final
duration Duration
Provide duration for the overall sliding time.
final
hashCode int
The hash code for this object.
@nonVirtualread-onlyinherited
initialState InitialPanelState
This decides the initial state of the panel.
final
isDraggable bool
Whether this panel is draggable by user. If false and user swipes the panel, internal content will start scrolling.
final
isTwoStatePanel bool
Whether this panel will work as modal bottom sheet (i.e., just close and expand, no collapsing).
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxWidth PanelMaxWidth
Specify maximum width of the panel. Used to specify BoxConstraints in Container.
final
onPanelSlide → (void Function?(double position)?)
A callback that is called whenever the panel is slided.
final
onPanelStateChanged → (void Function?(PanelState state)?)
A callback that is called whenever the state of the panel is changed.
final
onThrowResult → (void Function?(dynamic result)?)
A callback that is called whenever PanelController.throwResult or PanelController.popWithThrowResult is called.
final
panelClosedOptions PanelClosedOptions
This helps you to execute specific actions when panel is closed.
final
panelController PanelController
Control this panel programmatically using a controller.
final
panelPoppingBehavior PanelPoppingBehavior
When any of the BackPressBehavior is given, if the user taps back button, panel's state is checked according to BackPressBehavior and animates accordingly (if needed).
final
parallaxSlideAmount double
Specify the amount of PanelContent.bodyContent to slide up when panel slides.
final
physics ScrollPhysics?
The scroll physics that determines how the scroll view should respond to user input.
final
renderPanelBackground bool
To render default background behind the panel.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
safeAreaConfig SafeAreaConfig
Apply necessary top, bottom and sides (left and right) padding to the panel to avoid OS intrusions like notch, status bar and nav-bar.
final
size PanelSize
Provide different height of the panel in percentage of screen's height according to panel's current state. None of these should be null.
final
snapping PanelSnapping
Apply snapping effect to panel while opening / closing.
final
snappingTriggerPercentage double
If snapping is applied, you can also provide this value to control at which extent the snapping takes place.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _SlidingPanelState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
@protectedinherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
@nonVirtualinherited