copyWith method

SelectableTextTheme copyWith({
  1. ValueGetter<double?>? cursorWidth,
  2. ValueGetter<double?>? cursorHeight,
  3. ValueGetter<Radius?>? cursorRadius,
  4. ValueGetter<Color?>? cursorColor,
  5. ValueGetter<BoxHeightStyle?>? selectionHeightStyle,
  6. ValueGetter<BoxWidthStyle?>? selectionWidthStyle,
  7. ValueGetter<bool?>? enableInteractiveSelection,
})

Implementation

SelectableTextTheme copyWith({
  ValueGetter<double?>? cursorWidth,
  ValueGetter<double?>? cursorHeight,
  ValueGetter<Radius?>? cursorRadius,
  ValueGetter<Color?>? cursorColor,
  ValueGetter<ui.BoxHeightStyle?>? selectionHeightStyle,
  ValueGetter<ui.BoxWidthStyle?>? selectionWidthStyle,
  ValueGetter<bool?>? enableInteractiveSelection,
}) {
  return SelectableTextTheme(
    cursorWidth: cursorWidth == null ? this.cursorWidth : cursorWidth(),
    cursorHeight: cursorHeight == null ? this.cursorHeight : cursorHeight(),
    cursorRadius: cursorRadius == null ? this.cursorRadius : cursorRadius(),
    cursorColor: cursorColor == null ? this.cursorColor : cursorColor(),
    selectionHeightStyle: selectionHeightStyle == null
        ? this.selectionHeightStyle
        : selectionHeightStyle(),
    selectionWidthStyle: selectionWidthStyle == null
        ? this.selectionWidthStyle
        : selectionWidthStyle(),
    enableInteractiveSelection: enableInteractiveSelection == null
        ? this.enableInteractiveSelection
        : enableInteractiveSelection(),
  );
}