Dismissible
A control that can be dismissed by dragging in the indicated dismiss_direction. When dragged or flung in the specified dismiss_direction, its content smoothly slides out of view.
After completing the sliding animation, if a resize_duration is provided, this control further animates its height (or width, depending on what is perpendicular to the dismiss_direction), gradually reducing it to zero over the specified resize_duration.
Inherits: LayoutControl, AdaptiveControl
Properties
background- A control that is stacked behind the content.content- The control that is being dismissed.cross_axis_end_offset- Specifies the end offset along the main axis once the content has been dismissed.dismiss_direction- The direction in which the control can be dismissed.dismiss_thresholds- The offset threshold the item has to be dragged in order to be considered as dismissed.movement_duration- The duration for content to dismiss or to come back to original position if not dismissed.resize_duration- The amount of time the control will spend contracting before on_dismiss is called.secondary_background- A control that is stacked behind the content and is exposed when it has been dragged up or to the left.
Events
on_confirm_dismiss- Gives the app an opportunity to confirm or veto a pending dismissal.on_dismiss- Called when this control has been dismissed, after finishing resizing.on_resize- Called when this dismissible changes size, for example, when contracting before being dismissed.on_update- Called when this control has been dragged.
Methods
confirm_dismiss- Resolve a pending dismissal decision triggered by on_confirm_dismiss.