FTappableGroup class
A group of FTappables that enables slide-across interaction.
When the user presses one tappable and slides their finger to another, the pressed state transfers to the new tappable. This is the pattern used in action sheets, where you can slide between buttons and the highlight follows your finger.
Only primary press and long-press gestures are group-managed. Other gestures like FTappable.onDoubleTap, FTappable.onSecondaryPress, and FTappable.onSecondaryLongPress remain on individual tappables.
Why do tappables inside OverlayPortals sometimes not respond to taps?
Wrap the overlay content in FTappableGroup.isolate.
This is probably caused by the OverlayPortal being wrapped in an FTappableGroup. Since an OverlayPortal reparents inherited widgets, the FTappables are registered with the ancestor FTappableGroup which does not hit test across rendering layers.
FPortal-based widgets handle this automatically.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- FTappableGroup
Constructors
- FTappableGroup({required Widget child, Key? key})
-
Creates an FTappableGroup.
const
Properties
- child → Widget
-
The child widget, typically containing multiple FTappables.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< FTappableGroup> -
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.
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, int wrapWidth = 65}) → 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
Static Methods
-
isolate(
{required Widget child}) → Widget -
Prevents widgets in the
childsubtree from registering with ancestor FTappableGroups.