An area of a Material that responds to touch. Has a configurable shape and can be configured to clip splashes that extend outside its bounds or not.

For a variant of this widget that is specialized for rectangular areas that always clip splashes, see InkWell.

Must have an ancestor Material widget in which to cause ink reactions.

If a Widget uses this class directly, it should include the following line at the top of its build function to call debugCheckHasMaterial:

assert(debugCheckHasMaterial(context));
Inheritance
Implemented by

Constructors

InkResponse({Key key, Widget child, GestureTapCallback onTap, GestureTapCallback onDoubleTap, GestureLongPressCallback onLongPress, ValueChanged<bool> onHighlightChanged, bool containedInkWell: false, BoxShape highlightShape: BoxShape.circle, double radius })

Creates an area of a Material that responds to touch.

Properties

child → Widget

The widget below this widget in the tree.

read-only
containedInkWell → bool

Whether this ink response should be clipped its bounds.

read-only
highlightShape → BoxShape

The shape (e.g., circle, rectangle) to use for the highlight drawn around this part of the material.

read-only
onDoubleTap → GestureTapCallback

Called when the user double taps this part of the material.

read-only
onHighlightChanged → ValueChanged<bool>

Called when this part of the material either becomes highlighted or stops behing highlighted.

read-only
onLongPress → GestureLongPressCallback

Called when the user long-presses on this part of the material.

read-only
onTap → GestureTapCallback

Called when the user taps this part of the material

read-only
radius → double

The radius of the ink splash.

read-only
hashCode → int

Get a hash code for this object.

read-only, inherited
key → Key

Controls how one widget replaces another widget in the tree.

read-only, inherited
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) → bool

The equality operator.

inherited

Methods

createState() → _InkResponseState<InkResponse>

Creates the mutable state for this widget at a given location in the tree.

debugCheckContext(BuildContext context) → bool

Asserts that the given context satisfies the prerequisites for this class.

getRectCallback(RenderBox referenceBox) → RectCallback

The rectangle to use for the highlight effect and for clipping the splash effects if containedInkWell is true.

createElement() → StatefulElement

Creates a StatefulElement to manage this widget's location in the tree.

inherited
debugFillDescription(List<String> description) → void

Add additional information to the given description for use by toString.

inherited
noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() → String

Returns a string representation of this object.

inherited
toStringShort() → String

A short, textual description of this widget.

inherited