shaderCallback property

ShaderCallback? shaderCallback
final

Called to get the gradient color for the range.

Defaults to null.

This snippet shows how to set shaderCallback for a range in LinearGaugeRange


LinearGaugeRange(
 shaderCallback: (Rect bounds) {
 return LinearGradient(colors: [
 Color(0xffE8DA5D),
 Color(0xffFB7D55),
 ], stops: <double>[
 0.4,
 0.9
 ]).createShader(bounds);
 )

Implementation

final ShaderCallback? shaderCallback;