Skip to main content
Stac InkWell allows you to build the Flutter InkWell widget using JSON.
To learn more about the InkWell widget in Flutter, refer to the official documentation.

Properties

PropertyTypeDescription
childStacWidgetThe widget below this InkWell.
onTapStacActionCalled when the user taps the InkWell.
onDoubleTapStacActionCalled when the user double taps the InkWell.
onLongPressStacActionCalled when the user presses and holds for a long duration.
onTapDownStacActionCalled when a tap gesture starts.
onTapUpStacActionCalled when a tap gesture is lifted.
onTapCancelStacActionCalled when a tap gesture is aborted.
onSecondaryTapStacActionCalled for a secondary tap (e.g., right-click on desktop).
onSecondaryTapUpStacActionCalled when a secondary tap is lifted.
onSecondaryTapDownStacActionCalled when a secondary tap gesture starts.
onSecondaryTapCancelStacActionCalled when a secondary tap gesture is aborted.
onHighlightChangedStacActionCalled when the InkWell highlight changes (pressed state).
onHoverStacActionCalled when a pointer enters or exits the widget area.
mouseCursorStacMouseCursorDefines the mouse cursor when it hovers over the InkWell.
focusColorStacColorColor of the focus highlight.
hoverColorStacColorColor when a pointer hovers over the InkWell.
highlightColorStacColorColor when the InkWell is pressed.
overlayColorStacColorRipple effect color over the child.
splashColorStacColorThe splash color of the ripple.
radiusdoubleDefines the splash radius.
borderRadiusStacBorderRadiusSets rounded corners for the ripple effect.
customBorderStacBorderCustom border shape for clipping and ripple.
enableFeedbackboolWhether to play feedback (e.g., sound, vibration) on tap.
excludeFromSemanticsboolWhether to exclude from accessibility tools like screen readers.
canRequestFocusboolWhether this widget can request focus.
onFocusChangeStacActionCallback for when the focus changes.
autofocusboolAutomatically focuses when the widget is built.
hoverDurationStacDurationDuration for the hover animation effect.

Example

StacInkWell(
  child: StacPadding(
    padding: StacEdgeInsets(top: 20, bottom: 20, right: 20, left: 20),
    child: StacText(
      data: 'Hello, World! from Inkwell',
      textAlign: StacTextAlign.center,
    ),
  ),
  splashColor: StacColors.purple,
  borderRadius: StacBorderRadius(
    topLeft: 20,
    topRight: 20,
    bottomLeft: 20,
    bottomRight: 20,
  ),
  radius: 20,
  hoverDuration: StacDuration(seconds: 10),
  onTap: StacNoneAction(),
)