CustomClipper<T> class

An interface for providing custom clips.

This class is used by a number of clip widgets (e.g., ClipRect and ClipPath).

The getClip method is called whenever the custom clip needs to be updated.

The shouldReclip method is called when a new instance of the class is provided, to check if the new instance actually represents different information.

The most efficient way to update the clip provided by this class is to supply a reclip argument to the constructor of the CustomClipper. The custom object will listen to this animation and update the clip whenever the animation ticks, avoiding both the build and layout phases of the pipeline.

See also:

Implementers

Constructors

CustomClipper({Listenable reclip })
Creates a custom clipper. [...]
const

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

getApproximateClipRect(Size size) Rect
Returns an approximation of the clip returned by getClip, as an axis-aligned Rect. This is used by the semantics layer to determine whether widgets should be excluded. [...]
getClip(Size size) → T
Returns a description of the clip given that the render object being clipped is of the given size.
shouldReclip(covariant CustomClipper<T> oldClipper) bool
Called whenever a new instance of the custom clipper delegate class is provided to the clip object, or any time that a new clip object is created with a new instance of the custom painter delegate class (which amounts to the same thing, because the latter is implemented in terms of the former). [...]
toString() String
Returns a string representation of this object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

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