SweepSteps class
Construct a new SweepSteps
that progresses from one color to the next in
hard steps as opposed to smooth transitions by way of duplicating colors and
stops.
See Steps for more information.
- Inheritance
- Implementers
- Available Extensions
Constructors
-
SweepSteps({double softness = 0.0, required List<
Color> colors, List<double> ? stops, TileMode tileMode = TileMode.clamp, AlignmentGeometry center = Alignment.center, double startAngle = 0.0, double endAngle = math.pi * 2, GradientTransform? transform}) -
A Steps gradient differs from a standard Gradient in its progression
from one color to the next. Instead of smoothly transitioning between
colors,
Steps
have hard edges created by duplicating colors and stops.const
Properties
- asGradient → SweepGradient
-
Resolve these
Steps
to its smoothGradient
counterpart by colors and stops duplication, considering softness.no setteroverride - center → AlignmentGeometry
-
The color that correlates to
stops
entry0
(the first color) is placed atAlignmentGeometry
center, an offset into the(-1,-1) x (1,1)
"paintbox" onto which the gradient will be painted.final -
colors
→ List<
Color> -
The colors the gradient should obtain at each of the stops.
finalinherited
- endAngle → double
-
The
startAngle
is just as described by SweepGradient.startAngle:final - hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- softness → double
-
An incredibly small
double
to provide as anadditive
for each second entry when duplicating stops for thisSteps
.finalinherited - startAngle → double
-
The
startAngle
is just as described by SweepGradient.startAngle:final -
steppedColors
→ List<
Color> -
A duplicated list of colors by
CopyColors
.no setterinherited -
steppedStops
→ List<
double> -
A duplicated list of stops by
CopyStops
(which may benull
, in which casestopsOrImplied
is employed).no setterinherited -
stops
→ List<
double> ? -
A list of values from 0.0 to 1.0 that denote fractions along the gradient.
finalinherited
- tileMode → TileMode
-
How these
Steps
should tile the plane beyond the region before its starting stop and after its ending stop.finalinherited - transform → GradientTransform?
-
The transform, if any, to apply to the gradient.
finalinherited
Methods
-
copyWith(
{double? softness, List< Color> ? colors, List<double> ? stops, TileMode? tileMode, AlignmentGeometry? center, double? startAngle, double? endAngle, GradientTransform? transform}) → SweepSteps -
📋 Returns a new copy of this
SweepSteps
with any provided optional parameters overriding those ofthis
. -
createShader(
Rect rect, {TextDirection? textDirection}) → Shader -
Resolve these
Steps
to its smoothGradient
counterpart, then use that gradient'screateShader()
method.inherited -
lerpFrom(
Gradient? a, double t) → Gradient? -
Linearly interpolates from another Gradient to
this
.override -
lerpTo(
Gradient? b, double t) → Gradient? -
Linearly interpolates from
this
to another Gradient.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
scale(
double factor) → SweepSteps -
Returns a new SweepSteps with its colors scaled by the given factor.
Since the alpha channel is what receives the scale factor,
0.0
or less results in a gradient that is fully transparent.override -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
lerp(
SweepSteps? a, SweepSteps? b, double t) → SweepSteps? -
Linearly interpolate between two SweepStepss.
override