SweepPaint class
A gradient around a point, the way a clock hand sweeps: 0° is twelve
o'clock and angles run clockwise, in degrees — the unit rotate uses.
Flutter's SweepGradient starts at three o'clock in radians; the
renderer turns it, so the file never has to.
Not stretched to the box the way RadialPaint is: an angle in a stretched box is not the angle that was typed.
- Inheritance
-
- Object
- ScenePaint
- SceneGradient
- SweepPaint
Constructors
-
SweepPaint({required List<
SceneColor> colors, List<double> ? stops, SceneAlignment center = SceneAlignment.center, double startAngle = 0, double endAngle = 360}) -
const
Properties
- center → SceneAlignment
-
final
-
colors
→ List<
SceneColor> -
finalinherited
- endAngle → double
-
Where the last colour sits; past it the last colour holds. 360 more
than startAngle is a full turn.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
-
resolvedStops
→ List<
double> -
stops when they give one position per colour, otherwise the even
spread. The engine refuses any other shape, so this is what reaches it.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startAngle → double
-
Where the first colour sits.
final
-
stops
→ List<
double> ? -
One position per colour, 0..1 along the gradient. Null spreads the
colours evenly — what the file omits, and what the editor writes out
the first time a stop is moved.
finalinherited
Methods
-
copyWith(
{SceneAlignment? center, double? startAngle, double? endAngle}) → SweepPaint -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
toWire(
) → Object -
override
-
withStops(
List< SceneColor> colors, List<double> ? stops) → SweepPaint -
This gradient with other colours at other positions, its shape kept —
what every stop edit is.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override