ChartShaderMapper<T> typedef Null safety

ChartShaderMapper<T> = Shader Function(T datum, int index, Color color, 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);