copyWith method
CockpitTextInputRequest
copyWith({
- String? text,
- int? selectionBase,
- int? selectionExtent,
- int? composingBase,
- int? composingExtent,
- CockpitTextInputAction? inputAction,
- bool? requestFocus,
- bool? clearExisting,
- bool clearText = false,
- bool clearSelectionBase = false,
- bool clearSelectionExtent = false,
- bool clearComposingBase = false,
- bool clearComposingExtent = false,
- bool clearInputAction = false,
Returns a copy of this CockpitTextInputRequest with supplied fields replaced.
Implementation
CockpitTextInputRequest copyWith({
String? text,
int? selectionBase,
int? selectionExtent,
int? composingBase,
int? composingExtent,
CockpitTextInputAction? inputAction,
bool? requestFocus,
bool? clearExisting,
bool clearText = false,
bool clearSelectionBase = false,
bool clearSelectionExtent = false,
bool clearComposingBase = false,
bool clearComposingExtent = false,
bool clearInputAction = false,
}) {
return CockpitTextInputRequest(
text: clearText ? null : (text ?? this.text),
selectionBase: clearSelectionBase
? null
: (selectionBase ?? this.selectionBase),
selectionExtent: clearSelectionExtent
? null
: (selectionExtent ?? this.selectionExtent),
composingBase: clearComposingBase
? null
: (composingBase ?? this.composingBase),
composingExtent: clearComposingExtent
? null
: (composingExtent ?? this.composingExtent),
inputAction: clearInputAction ? null : (inputAction ?? this.inputAction),
requestFocus: requestFocus ?? this.requestFocus,
clearExisting: clearExisting ?? this.clearExisting,
);
}