EGradient constructor

EGradient(
  1. List<EColorShift> colorShifts
)

Implementation

EGradient(this.colorShifts) {
  if (this.colorShifts.isEmpty) {
    this.colorShifts.add(EColorShift([Color.fromARGB(0, 0, 0, 0)], 0));
  }
  if (this.colorShifts.length == 1) {
    this.colorShifts.add(this.colorShifts[0]);
  }
}