ChartShaderMapper<T> typedef Null safety

Shader ChartShaderMapper<T>(
  1. T datum,
  2. int index,
  3. Color color,
  4. Rect rect
)

Signature for the callback that returns the shader from the data source based on the index. Can get the data, index, color and rect values.

T - Data of the current data point

index - Index of the current data point

rect - Rect value of the current data point slice

color - Color of the current data point

Implementation

typedef ChartShaderMapper<T> = Shader Function(
    T datum, int index, Color color, Rect rect);