TapSpec constructor

const TapSpec({
  1. bool tappable = true,
  2. bool providesFeedback = false,
  3. Color? inkSplashColor,
  4. Color? inkHighlightColor,
  5. InteractiveInkFeatureFactory? splashFactory,
  6. bool useThemeSplashFactory = false,
  7. VoidCallback? onTap,
})

Not only does 👆 tappable provide onTap Callback functionality, it also adds InkResponse to the Material underneath child.

providesFeedback is a convenience parameter to add a HapticFeedback.vibrate onTap.

Ink splash Colors may be customized with a 👆 TapSpec.


🌟 Surface comes bundled with 🏓 package:ball.

Disable the default BouncyBall.splashFactory with ❓ useThemeSplashFactory or select an InteractiveInkFeatureFactory specific to this 👆 TapSpec with splashFactory.

Implementation

const TapSpec({
  this.tappable = true,
  this.providesFeedback = false,
  this.inkSplashColor,
  this.inkHighlightColor,
  this.splashFactory,
  this.useThemeSplashFactory = false,
  this.onTap,
});