A 2D linear gradient.
Constructors
- LinearGradient({FractionalOffset begin: FractionalOffset.centerLeft, FractionalOffset end: FractionalOffset.centerRight, List<Color> colors, List<double> stops, TileMode tileMode: TileMode.clamp })
-
Creates a linear graident.
const
Properties
- begin → FractionalOffset
-
The offset from coordinate (0.0,0.0) at which stop 0.0 of the gradient is placed, in a coordinate space that maps the top left of the paint box at (0.0,0.0) and the bottom right at (1.0,1.0).
read-only - colors → List<Color>
-
The colors the gradient should obtain at each of the stops.
read-only - end → FractionalOffset
-
The offset from coordinate (0.0,0.0) at which stop 1.0 of the gradient is placed, in a coordinate space that maps the top left of the paint box at (0.0,0.0) and the bottom right at (1.0,1.0).
read-only - hashCode → int
-
read-only
- stops → List<double>
-
A list of values from 0.0 to 1.0 that denote fractions of the vector from start to end.
read-only - tileMode → TileMode
-
How this gradient should tile the plane.
read-only - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
Methods
-
createShader(
Rect rect) → Shader -
Creates a
Shader
for this gradient to fill the given rect. -
toString(
) → String -
Returns a string representation of this object.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited