InkHighlight class Null safety

A visual emphasis on a part of a Material receiving user interaction.

This object is rarely created directly. Instead of creating an ink highlight directly, consider using an InkResponse or InkWell widget, which uses gestures (such as tap and long-press) to trigger ink highlights.

See also:

  • 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 highlight is painted.
  • InkSplash, which is an ink feature that shows a reaction to user input on a Material.
  • Ink, a convenience widget for drawing images and other decorations on Material widgets.
Inheritance

Constructors

InkHighlight({required MaterialInkController controller, required RenderBox referenceBox, required Color color, required TextDirection textDirection, BoxShape shape = BoxShape.rectangle, double? radius, BorderRadius? borderRadius, ShapeBorder? customBorder, RectCallback? rectCallback, VoidCallback? onRemoved, Duration fadeDuration = _kDefaultHighlightFadeDuration})
Begin a highlight animation.

Properties

active bool
Whether this part of the material is being visually emphasized.
read-only
color Color
The ink's color.
read / writeinherited
controller MaterialInkController
The MaterialInkController associated with this InkFeature.
read-onlyinherited
hashCode int
The hash code for this object.
read-onlyinherited
onRemoved VoidCallback?
Called when the ink feature is no longer visible on the material.
finalinherited
referenceBox RenderBox
The render box whose visual position defines the frame of reference for this ink feature.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

activate() → void
Start visually emphasizing this part of the material.
cancel() → void
Called when the user input that triggered this feature's appearance was canceled.
inherited
confirm() → void
Called when the user input that triggered this feature's appearance was confirmed.
inherited
deactivate() → void
Stop visually emphasizing this part of the material.
dispose() → void
Free up the resources associated with this ink feature.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
paintFeature(Canvas canvas, Matrix4 transform) → void
Override this method to paint the ink feature.
override
paintInkCircle({required Canvas canvas, required Matrix4 transform, required Paint paint, required Offset center, required double radius, TextDirection? textDirection, ShapeBorder? customBorder, BorderRadius borderRadius = BorderRadius.zero, RectCallback? clipCallback}) → void
Draws an ink splash or ink ripple on the passed in Canvas.
protected">@protectedinherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited