ReusedGradient class

Wrapper for Gradient, we don't want to re-create instance frequently in hot method, such as paint().

Constructors

ReusedGradient.new()
Create gradient

Properties

gradient Gradient?
Setter to reset the Gradient instance
no getter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
valid bool
check if the gradient is valid or not
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateWith(Paint paint, {Rect? size}) → void
Update the paint with provided size

Operators

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