GlassSwipeAction class
A discrete swipeable action button in a GlassSwipeActions platter.
Defines the icon, label, background color, and behavior for a leading or trailing action in a swipeable list row.
- Annotations
Constructors
- GlassSwipeAction({required Widget icon, Widget? label, required VoidCallback onTap, Color? backgroundColor, Color? foregroundColor = CupertinoColors.white, bool isDestructive = false, bool closeOnTap = true, int flex = 1, String? semanticLabel})
-
Creates a swipe action.
const
Properties
- backgroundColor → Color?
-
Background color of the action platter.
final
- closeOnTap → bool
-
Whether the swipe platter should automatically spring closed when this
action is tapped.
final
- flex → int
-
Proportional width share if multiple actions are shown.
final
- foregroundColor → Color?
-
Color applied to icon and label.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → Widget
-
The icon widget displayed for this action.
final
- isDestructive → bool
-
Whether this action represents a destructive action (e.g. Delete, Trash).
final
- label → Widget?
-
Optional text label displayed beneath icon.
final
- onTap → VoidCallback
-
Callback executed when the action is triggered by tap or full swipe.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticLabel → String?
-
Accessibility label announced by screen readers.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited