isValidGradientDraft static method
Used to verify that the gradient is valid to be used as a draft.
This test just makes sure the gradient doesn't get too many elements. It it not a strict enough test to make sure the gradient is valid for a PUT or POST request. For that, see isValidGradient.
Returns true
if:
points
isnull
points
has 0 to 5 (inclusive) elements
Implementation
static bool isValidGradientDraft(List<LightColorXy>? points) =>
points == null || points.length <= 5;