Pressable class abstract
Choose named constructors to pick press effect.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- Pressable
- Implementers
Constructors
- Pressable({Key? key})
-
const
- Pressable.builder({Key? key, required PressableBuilderCallback builder, VoidCallback? onPressed, VoidCallback? onLongPressed})
-
Use builder to define your own effect.
factory
- Pressable.fill({Key? key, required Widget child, VoidCallback? onPressed, VoidCallback? onLongPressed, PressableFillTheme? theme})
-
Puts PressableFillTheme.fillColor over the
child
when pressed. PressableFillTheme.fillColor needs to be semi-transparent so that thechild
can be visible.factory - Pressable.opacity({Key? key, required Widget child, VoidCallback? onPressed, VoidCallback? onLongPressed, PressableOpacityTheme? theme})
-
Adds PressableOpacityTheme.opacityFactor opacity to the
child
when pressed.factory - Pressable.platform({Key? key, required Widget child, VoidCallback? onPressed, VoidCallback? onLongPressed, PressableTheme? ios, PressableTheme? android, PressableTheme? macOS, PressableTheme? windows, PressableTheme? linux})
-
Provide platform specific PressableTheme. You must provide theme for
current platform otherwise error is thrown.
factory
- Pressable.ripple({Key? key, required Widget child, VoidCallback? onPressed, VoidCallback? onLongPressed, PressableRippleTheme? theme})
-
Uses the InkWell Widget from Flutter.
factory
- Pressable.scale({Key? key, required Widget child, VoidCallback? onPressed, VoidCallback? onLongPressed, PressableScaleTheme? theme})
-
Scales the
child
to PressableScaleTheme.scaleFactor when tapped.factory
Properties
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< StatefulWidget> -
Creates the mutable state for this widget at a given 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