Revised LinearGradient ctor checking.
It's OK to just specify the colors list.
This commit is contained in:
parent
2e600e5c76
commit
adba86431e
@ -306,9 +306,7 @@ class LinearGradient extends Gradient {
|
|||||||
this.colors,
|
this.colors,
|
||||||
this.stops,
|
this.stops,
|
||||||
this.tileMode: ui.TileMode.clamp
|
this.tileMode: ui.TileMode.clamp
|
||||||
}) {
|
});
|
||||||
assert(colors.length == stops.length);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The point at which stop 0.0 of the gradient is placed
|
/// The point at which stop 0.0 of the gradient is placed
|
||||||
final Point begin;
|
final Point begin;
|
||||||
@ -323,7 +321,8 @@ class LinearGradient extends Gradient {
|
|||||||
|
|
||||||
/// A list of values from 0.0 to 1.0 that denote fractions of the vector from start to end
|
/// A list of values from 0.0 to 1.0 that denote fractions of the vector from start to end
|
||||||
///
|
///
|
||||||
/// Note: This list must have the same length as [colors].
|
/// Note: If specified, this list must have the same length as [colors]. Otherwise the colors
|
||||||
|
/// are distributed evenly between [begin] and [end].
|
||||||
final List<double> stops;
|
final List<double> stops;
|
||||||
|
|
||||||
/// How this gradient should tile the plane
|
/// How this gradient should tile the plane
|
||||||
|
Loading…
x
Reference in New Issue
Block a user