copyWith method

SelectionBehavior copyWith({
  1. bool? enable,
  2. Color? selectedColor,
  3. Color? unselectedColor,
  4. Color? selectedBorderColor,
  5. Color? unselectedBorderColor,
  6. double? selectedBorderWidth,
  7. double? unselectedBorderWidth,
  8. double? selectedOpacity,
  9. double? unselectedOpacity,
  10. bool? toggleSelection,
})

Implementation

SelectionBehavior copyWith({
  bool? enable,
  Color? selectedColor,
  Color? unselectedColor,
  Color? selectedBorderColor,
  Color? unselectedBorderColor,
  double? selectedBorderWidth,
  double? unselectedBorderWidth,
  double? selectedOpacity,
  double? unselectedOpacity,
  bool? toggleSelection,
}) {
  return SelectionBehavior(
    enable: enable ?? this.enable,
    selectedColor: selectedColor ?? this.selectedColor,
    unselectedColor: unselectedColor ?? this.unselectedColor,
    selectedBorderColor: selectedBorderColor ?? this.selectedBorderColor,
    unselectedBorderColor:
        unselectedBorderColor ?? this.unselectedBorderColor,
    selectedBorderWidth: selectedBorderWidth ?? this.selectedBorderWidth,
    unselectedBorderWidth:
        unselectedBorderWidth ?? this.unselectedBorderWidth,
    selectedOpacity: selectedOpacity ?? this.selectedOpacity,
    unselectedOpacity: unselectedOpacity ?? this.unselectedOpacity,
    toggleSelection: toggleSelection ?? this.toggleSelection,
  );
}