copyWith method

CheckboxThemeData copyWith({
  1. MaterialStateProperty<MouseCursor?>? mouseCursor,
  2. MaterialStateProperty<Color?>? fillColor,
  3. MaterialStateProperty<Color?>? checkColor,
  4. MaterialStateProperty<Color?>? overlayColor,
  5. double? splashRadius,
  6. MaterialTapTargetSize? materialTapTargetSize,
  7. VisualDensity? visualDensity,
  8. OutlinedBorder? shape,
  9. BorderSide? side,
})

Creates a copy of this object but with the given fields replaced with the new values.

Implementation

CheckboxThemeData copyWith({
  MaterialStateProperty<MouseCursor?>? mouseCursor,
  MaterialStateProperty<Color?>? fillColor,
  MaterialStateProperty<Color?>? checkColor,
  MaterialStateProperty<Color?>? overlayColor,
  double? splashRadius,
  MaterialTapTargetSize? materialTapTargetSize,
  VisualDensity? visualDensity,
  OutlinedBorder? shape,
  BorderSide? side,
}) {
  return CheckboxThemeData(
    mouseCursor: mouseCursor ?? this.mouseCursor,
    fillColor: fillColor ?? this.fillColor,
    checkColor: checkColor ?? this.checkColor,
    overlayColor: overlayColor ?? this.overlayColor,
    splashRadius: splashRadius ?? this.splashRadius,
    materialTapTargetSize: materialTapTargetSize ?? this.materialTapTargetSize,
    visualDensity: visualDensity ?? this.visualDensity,
    shape: shape ?? this.shape,
    side: side ?? this.side,
  );
}