RippleTapMechanic class
A tap mechanic that provides Material Design ripple/ink effects.
This is the default tap mechanic and uses Flutter's InkWell to provide the familiar Material ripple animation when tapped.
Example:
Tappable(
onTap: () => print('Tapped!'),
tapMechanics: [
RippleTapMechanic(
splashColor: Colors.blue.withOpacity(0.3),
highlightColor: Colors.blue.withOpacity(0.1),
),
],
child: Text('Tap me'),
)
- Inheritance
-
- Object
- TapMechanic
- RippleTapMechanic
Constructors
- RippleTapMechanic({Color? splashColor, Color? highlightColor, double? splashRadius, InteractiveInkFeatureFactory? splashFactory})
- Creates a Material ripple tap mechanic.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- highlightColor → Color?
-
The highlight color of the ink response when pressed.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- splashColor → Color?
-
The splash color of the ink response.
final
- splashFactory → InteractiveInkFeatureFactory?
-
Defines the ink splash behavior.
final
- splashRadius → double?
-
The radius of the ink splash.
final
Methods
-
build(
{required BuildContext context, required VoidCallback? onTap, required Widget child, BorderRadius? borderRadius}) → Widget -
Builds the interactive widget with tap effects.
override
-
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