copyWith method Null safety

RadioThemeData copyWith(
  1. {MaterialStateProperty<MouseCursor?>? mouseCursor,
  2. MaterialStateProperty<Color?>? fillColor,
  3. MaterialStateProperty<Color?>? overlayColor,
  4. double? splashRadius,
  5. MaterialTapTargetSize? materialTapTargetSize,
  6. VisualDensity? visualDensity}
)

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

Implementation

RadioThemeData copyWith({
  MaterialStateProperty<MouseCursor?>? mouseCursor,
  MaterialStateProperty<Color?>? fillColor,
  MaterialStateProperty<Color?>? overlayColor,
  double? splashRadius,
  MaterialTapTargetSize? materialTapTargetSize,
  VisualDensity? visualDensity,
}) {
  return RadioThemeData(
    mouseCursor: mouseCursor ?? this.mouseCursor,
    fillColor: fillColor ?? this.fillColor,
    overlayColor: overlayColor ?? this.overlayColor,
    splashRadius: splashRadius ?? this.splashRadius,
    materialTapTargetSize: materialTapTargetSize ?? this.materialTapTargetSize,
    visualDensity: visualDensity ?? this.visualDensity,
  );
}