GradientRef class final

Token reference for Gradient values

Inheritance
Implemented types
Mixed-in types

Constructors

GradientRef(Prop<Gradient> prop)

Properties

$directives → List<Directive<Gradient>>?
Optional directives to transform the resolved value.
finalinherited
colors → List<Color>
The colors the gradient should obtain at each of the stops.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
hasToken → bool
Whether this property contains at least one token source.
no setterinherited
hasValue → bool
Whether this property contains at least one value source.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sources → List<PropSource<Gradient>>
The list of sources that provide values for this property.
finalinherited
stops → List<double>?
A list of values from 0.0 to 1.0 that denote fractions along the gradient.
finalinherited
transform → GradientTransform?
The transform, if any, to apply to the gradient.
finalinherited
type → Type
The runtime type of the property's value.
no setterinherited

Methods

createShader(Rect rect, {TextDirection? textDirection}) → Shader
Creates a Shader for this gradient to fill the given rect.
inherited
directives(List<Directive<Gradient>> directives) → Prop<Gradient>
Returns a new property with the given directives merged with existing ones.
inherited
fromColor(Color color) → Gradient
Returns a copy of this gradient with all of its colors replaced by the given color.
inherited
lerpFrom(Gradient? a, double t) → Gradient?
Linearly interpolates from another Gradient to this.
inherited
lerpTo(Gradient? b, double t) → Gradient?
Linearly interpolates from this to another Gradient.
inherited
mergeProp(covariant Prop<Gradient>? other) → Prop<Gradient>
Merges this property with another property.
inherited
noSuchMethod(Invocation invocation) → Never
Invoked when a nonexistent method or property is accessed.
inherited
scale(double factor) → Gradient
Returns a new gradient with its properties scaled by the given factor.
inherited
toString() → String
A string representation of this object.
inherited
withOpacity(double opacity) → Gradient
Returns a new Gradient with each color set to the given opacity.
inherited

Operators

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