LinearGradientSpec class final
A linear gradient in the local coordinate space of its painted target.
The line's start and end are explicit document semantics. They are not derived from artboard size, a renderer, or an editor control. Stops are intentionally preserved as authored, including duplicate offsets for hard transitions; document validation checks that the list is usable.
Constructors
-
LinearGradientSpec({required Vec2 start, required Vec2 end, required Iterable<
GradientStop> stops}) -
factory
-
LinearGradientSpec.fromJson(Map<
String, dynamic> json) -
factory
Properties
Methods
-
copyWith(
{Vec2? start, Vec2? end, Iterable< GradientStop> ? stops}) → LinearGradientSpec -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Constants
- transparent → const LinearGradientSpec