SlidingPanel constructor
const
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
Implementation
const SlidingPanel({
Key? key,
this.initialState = InitialPanelState.closed,
this.animatedAppearing = false,
required this.content,
this.size = const PanelSize(),
this.maxWidth = const PanelMaxWidth(),
this.decoration = const PanelDecoration(),
this.backdropConfig = const BackdropConfig(),
required this.panelController,
this.autoSizing = const PanelAutoSizing(),
this.renderPanelBackground = true,
this.snapping = PanelSnapping.disabled,
this.snappingTriggerPercentage = 0.0,
this.isDraggable = true,
this.physics,
this.parallaxSlideAmount = 0.2,
this.dragMultiplier = 1.0,
this.duration = const Duration(milliseconds: 1000),
this.curve = Curves.fastOutSlowIn,
this.isTwoStatePanel = false,
this.backPressBehavior = BackPressBehavior.POP,
this.panelPoppingBehavior = PanelPoppingBehavior.POP_AFTER_TAP,
this.panelClosedOptions = const PanelClosedOptions(),
this.safeAreaConfig = const SafeAreaConfig.all(),
this.onPanelSlide,
this.onPanelStateChanged,
this.onThrowResult,
}) : this._isModal = false,
_panelModalRoute = null;