copyWith method
Creates a new TextSelection based on the current selection, with the provided parameters overridden.
Implementation
TextSelection copyWith({
int baseOffset,
int extentOffset,
TextAffinity affinity,
bool isDirectional,
}) {
return TextSelection(
baseOffset: baseOffset ?? this.baseOffset,
extentOffset: extentOffset ?? this.extentOffset,
affinity: affinity ?? this.affinity,
isDirectional: isDirectional ?? this.isDirectional,
);
}