TapSpec constructor

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

👆 TapSpec

Not only does tappable provide Surface.onTap Callback, it also adds an InkResponse to the Material before rendering child.

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

If tappable == true the InkResponse appearance may be customized. Otherwise no InkResponse is rendered with the Surface.

Implementation

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