DismissiblePage class
Flutter widget that allows you to dismiss page to any direction, forget the boring back button and plain transitions.
- Dismiss to any direction
- Works with nested list view
- Animating border
- Animating background
- Animating scale
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- DismissiblePage
Constructors
-
DismissiblePage({required Widget child, required VoidCallback onDismissed, VoidCallback? onDragStart, VoidCallback? onDragEnd, ValueChanged<
DismissiblePageDragUpdateDetails> ? onDragUpdate, bool isFullScreen = true, bool disabled = false, Color backgroundColor = Colors.black, DismissiblePageDismissDirection direction = DismissiblePageDismissDirection.vertical, Map<DismissiblePageDismissDirection, double> dismissThresholds = const <DismissiblePageDismissDirection, double>{}, DragStartBehavior dragStartBehavior = DragStartBehavior.down, double dragSensitivity = 0.7, double minRadius = 7, double minScale = .85, double maxRadius = 30, double maxTransformValue = .4, double startingOpacity = 1, HitTestBehavior hitTestBehavior = HitTestBehavior.opaque, Duration reverseDuration = const Duration(milliseconds: 200), Key? key}) -
const
Properties
- backgroundColor → Color
-
Background color of DismissiblePage
final
- child → Widget
-
Widget that should be dismissed
final
- direction → DismissiblePageDismissDirection
-
The direction in which the widget can be dismissed.
final
- disabled → bool
-
If true the widget will ignore gestures
final
-
dismissThresholds
→ Map<
DismissiblePageDismissDirection, double> -
The offset threshold the item has to be dragged in order to be considered
dismissed. default is
_kDismissThreshold
, value (0.0 - 1.0)final - dragSensitivity → double
-
Represents how much responsive dragging the widget will be
Doesn't work on DismissiblePageDismissDirection.multi
final
- dragStartBehavior → DragStartBehavior
-
Determines the way that drag start behavior is handled.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hitTestBehavior → HitTestBehavior
-
How to behave during hit tests.
final
- isFullScreen → bool
-
If true widget will ignore device padding
MediaQuery.of(context).padding
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- maxRadius → double
-
The maximum amount of border radius widget can have while dragging
Note that radius increases as user drags
final
- maxTransformValue → double
-
The amount of distance widget is able to drag. value (0.0 - 1.0)
final
- minRadius → double
-
The minimum amount fo border radius widget can have
final
- minScale → double
-
The minimum amount of scale widget can have while dragging
Note that scale decreases as user drags
final
- onDismissed → VoidCallback
-
Called when the widget has been dismissed.
final
- onDragEnd → VoidCallback?
-
Called when the user ends dragging the widget.
final
- onDragStart → VoidCallback?
-
Called when the user starts dragging the widget.
final
-
onDragUpdate
→ ValueChanged<
DismissiblePageDragUpdateDetails> ? -
Called when the widget has been dragged. (0.0 - 1.0)
final
- reverseDuration → Duration
-
The amount of time the widget will spend returning to initial position if widget is not dismissed after drag
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startingOpacity → double
-
The amount of opacity backgroundColor will have when start dragging the widget.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of
DiagnosticsNode
objects describing this node's children.inherited -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent 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.
inherited