InkDecoration class

A decoration on a part of a Material.

This object is rarely created directly. Instead of creating an ink decoration directly, consider using an Ink widget, which uses this class in combination with Padding and ConstrainedBox to draw a decoration on a Material.

See also:

  • Ink, the corresponding widget.
  • InkResponse, which uses gestures to trigger ink highlights and ink splashes in the parent Material.
  • InkWell, which is a rectangular InkResponse (the most common type of ink response).
  • Material, which is the widget on which the ink is painted.
Inheritance

Constructors

InkDecoration({@required Decoration decoration, @required ImageConfiguration configuration, @required MaterialInkController controller, @required RenderBox referenceBox, VoidCallback onRemoved })
Draws a decoration on a Material.

Properties

configuration ImageConfiguration
The configuration to pass to the BoxPainter obtained from the decoration, when painting. [...]
read / write
decoration Decoration
What to paint on the Material. [...]
read / write
controller MaterialInkController
The MaterialInkController associated with this InkFeature. [...]
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
onRemoved VoidCallback
Called when the ink feature is no longer visible on the material.
final, inherited
referenceBox RenderBox
The render box whose visual position defines the frame of reference for this ink feature.
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

dispose() → void
Free up the resources associated with this ink feature.
paintFeature(Canvas canvas, Matrix4 transform) → void
Override this method to paint the ink feature. [...]
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

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited