copyWith method

  1. @override
DragTextSelection copyWith({
  1. int? baseOffset,
  2. int? extentOffset,
  3. TextAffinity? affinity,
  4. bool? isDirectional,
  5. bool? first,
})
override

Creates a new TextSelection based on the current selection, with the provided parameters overridden.

Implementation

@override
DragTextSelection copyWith({
  int? baseOffset,
  int? extentOffset,
  TextAffinity? affinity,
  bool? isDirectional,
  bool? first,
}) {
  return DragTextSelection(
    baseOffset: baseOffset ?? this.baseOffset,
    extentOffset: extentOffset ?? this.extentOffset,
    affinity: affinity ?? this.affinity,
    isDirectional: isDirectional ?? this.isDirectional,
    first: first ?? this.first,
  );
}