LightGradient constructor

LightGradient({
  1. required List<LightColorXy> points,
  2. required String mode,
  3. required List<String> modeValues,
})

Creates a LightGradient object.

Implementation

LightGradient({
  required List<LightColorXy> points,
  required String mode,
  required this.modeValues,
})  : assert(points.length <= 5, "`points` must have 5 or fewer elements"),
      _originalPoints = points.map((point) => point.copyWith()).toList(),
      _points = points,
      _originalMode = mode,
      _mode = mode;