copyWith method

WheelSegment<T> copyWith({
  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 copy of this segment with the given fields replaced.

Implementation

WheelSegment<T> copyWith({
  String? label,
  T? value,
  Color? color,
  String? path,
  ImageProvider? imageProvider,
  ui.Image? image,
  Widget? child,
  TextStyle? textStyle,
  String? semanticLabel,
  double? probability,
}) {
  return WheelSegment<T>(
    label ?? this.label,
    value ?? this.value,
    color: color ?? this.color,
    path: path ?? this.path,
    imageProvider: imageProvider ?? this.imageProvider,
    image: image ?? this.image,
    child: child ?? this.child,
    textStyle: textStyle ?? this.textStyle,
    semanticLabel: semanticLabel ?? this.semanticLabel,
    probability: probability ?? this.probability,
  );
}