makeGradient method Null safety

  1. @override
Gradient makeGradient(
  1. Offset start,
  2. Offset end,
  3. List<Color> colors,
  4. List<double> colorPositions

We override the make gradient operation to create a radial gradient instead of a linear one.


ui.Gradient makeGradient(ui.Offset start, ui.Offset end,
        List<ui.Color> colors, List<double> colorPositions) =>
    ui.Gradient.radial(start, (end - start).distance, colors, colorPositions);