KdGaugeView constructor
KdGaugeView({
- GlobalKey<
State< ? key,StatefulWidget> > - double speed = 0,
- TextStyle speedTextStyle = const TextStyle(color: Colors.black, fontSize: 60, fontWeight: FontWeight.bold),
- String unitOfMeasurement = 'Km/Hr',
- TextStyle unitOfMeasurementTextStyle = const TextStyle(color: Colors.black, fontSize: 30, fontWeight: FontWeight.w600),
- required double minSpeed,
- required double maxSpeed,
- TextStyle minMaxTextStyle = const TextStyle(color: Colors.black, fontSize: 20),
- List<
double> alertSpeedArray = const [], - List<
Color> alertColorArray = const [], - double gaugeWidth = 10,
- Color baseGaugeColor = Colors.transparent,
- Color inactiveGaugeColor = Colors.black87,
- Color activeGaugeColor = Colors.green,
- double innerCirclePadding = 30,
- Color divisionCircleColors = Colors.blue,
- Color subDivisionCircleColors = Colors.blue,
- bool animate = false,
- Duration duration = const Duration(milliseconds: 400),
- int fractionDigits = 0,
- Widget? child,
- Gradient? activeGaugeGradientColor,
Implementation
KdGaugeView(
{GlobalKey? key,
this.speed = 0,
this.speedTextStyle = const TextStyle(
color: Colors.black,
fontSize: 60,
fontWeight: FontWeight.bold,
),
this.unitOfMeasurement = 'Km/Hr',
this.unitOfMeasurementTextStyle = const TextStyle(
color: Colors.black,
fontSize: 30,
fontWeight: FontWeight.w600,
),
required this.minSpeed,
required this.maxSpeed,
this.minMaxTextStyle = const TextStyle(
color: Colors.black,
fontSize: 20,
),
this.alertSpeedArray = const [],
this.alertColorArray = const [],
this.gaugeWidth = 10,
this.baseGaugeColor = Colors.transparent,
this.inactiveGaugeColor = Colors.black87,
this.activeGaugeColor = Colors.green,
this.innerCirclePadding = 30,
this.divisionCircleColors = Colors.blue,
this.subDivisionCircleColors = Colors.blue,
this.animate = false,
this.duration = const Duration(milliseconds: 400),
this.fractionDigits = 0,
this.child,
this.activeGaugeGradientColor})
: assert(alertSpeedArray.length == alertColorArray.length,
'Alert speed array length should be equal to Alert Speed Color Array length'),
super(key: key);