copyWith method Null safety

TextSelectionThemeData copyWith(
  1. {Color? cursorColor,
  2. Color? selectionColor,
  3. Color? selectionHandleColor}
)

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

Implementation

TextSelectionThemeData copyWith({
  Color? cursorColor,
  Color? selectionColor,
  Color? selectionHandleColor,
}) {
  return TextSelectionThemeData(
    cursorColor: cursorColor ?? this.cursorColor,
    selectionColor: selectionColor ?? this.selectionColor,
    selectionHandleColor: selectionHandleColor ?? this.selectionHandleColor,
  );
}