RelevanceIndicator constructor

const RelevanceIndicator({
  1. Key? key,
  2. required int value,
  3. int amount = 20,
  4. double barHeight = 20,
  5. double barWidth = 0.8,
  6. Color selectedColor = CupertinoColors.label,
  7. Color unselectedColor = CupertinoColors.secondaryLabel,
  8. String? semanticLabel,
})

Creates a relevance indicator.

value must be in range of 0 to amount

amount must be non-null and greater than 0

barHeight and barWidth must be non-null

Implementation

const RelevanceIndicator({
  super.key,
  required this.value,
  this.amount = 20,
  this.barHeight = 20,
  this.barWidth = 0.8,
  this.selectedColor = CupertinoColors.label,
  this.unselectedColor = CupertinoColors.secondaryLabel,
  this.semanticLabel,
})  : assert(value >= 0 && value <= amount),
      assert(amount > 0),
      assert(barHeight >= 0),
      assert(barWidth >= 0);