CapacityIndicator constructor

const CapacityIndicator({
  1. Key? key,
  2. required double value,
  3. ValueChanged<double>? onChanged,
  4. bool discrete = false,
  5. int splits = 10,
  6. Color color = CupertinoColors.systemGreen,
  7. Color borderColor = CupertinoColors.tertiaryLabel,
  8. Color backgroundColor = CupertinoColors.tertiarySystemGroupedBackground,
  9. String? semanticLabel,
})

Creates a capacity indicator.

value must be in range of 0 to 100.

Implementation

const CapacityIndicator({
  super.key,
  required this.value,
  this.onChanged,
  this.discrete = false,
  this.splits = 10,
  this.color = CupertinoColors.systemGreen,
  this.borderColor = CupertinoColors.tertiaryLabel,
  this.backgroundColor = CupertinoColors.tertiarySystemGroupedBackground,
  this.semanticLabel,
}) : assert(value >= 0 && value <= 100);