shadeFunction property Null safety

ColorArithmetic shadeFunction
final

For any given "step", comprised of a single color "quadruplicated" across four stops, the shadeFunction will be called on the color and this result is placed as the fourth, final stop for this color step.

There is a standard gradient transition between color and the "shaded" final entry shadeFunction(color, shadeFactor) begining at a percentage from start->end of this step denoted by distance. Default distance is 0.6.

A ColorArithmetic function, as required, must confrom to

Color Function(Color color, double factor)

Default shadeFunction is Shades.withWhite which provides shadeFactor as color.withWhite(shadeFactor). Method withWhite() is like withRed() or withBlue() but it adds the given value to all three Color components, lightening the color. See Shading.

See Shades for a few pre-defined ColorArithmetic functions.

Implementation

final ColorArithmetic shadeFunction;