WheelSegment<T> constructor

WheelSegment<T>(
  1. String label,
  2. T value, {
  3. Color? color,
  4. String? path,
  5. ImageProvider<Object>? imageProvider,
  6. Image? image,
  7. Widget? child,
  8. TextStyle? textStyle,
  9. String? semanticLabel,
  10. double? probability,
})

Creates a new WheelSegment.

Implementation

WheelSegment(
  this.label,
  this.value, {
  Color? color,
  this.path,
  this.imageProvider,
  this.image,
  this.child,
  this.textStyle,
  this.semanticLabel,
  this.probability,
}) : color = color ??
          Colors.primaries[
              Object.hash(label, value).abs() % Colors.primaries.length];