|
|
|
|
|
|
|
|
|
|
TextEditingValue _lastKnownRemoteTextEditingValue; |
|
|
|
|
|
|
|
public void updateEditingValue(TextEditingValue value) { |
|
|
|
public void updateEditingValue(TextEditingValue value, bool imeInput) { |
|
|
|
if (value.text != this._value.text) { |
|
|
|
this._hideSelectionOverlayIfNeeded(); |
|
|
|
this._showCaretOnScreen(); |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this._lastKnownRemoteTextEditingValue = value; |
|
|
|
this._formatAndSetValue(value); |
|
|
|
this._formatAndSetValue(value, imeInput); |
|
|
|
|
|
|
|
this._stopCursorTimer(resetCharTicks: false); |
|
|
|
this._startCursorTimer(); |
|
|
|
|
|
|
return Promise<bool>.Resolved(false); |
|
|
|
} |
|
|
|
|
|
|
|
void _formatAndSetValue(TextEditingValue value) { |
|
|
|
var textChanged = this._value?.text != value?.text; |
|
|
|
void _formatAndSetValue(TextEditingValue value, bool imeInput = false) { |
|
|
|
var textChanged = this._value?.text != value?.text || imeInput; |
|
|
|
if (textChanged && this.widget.inputFormatters != null && this.widget.inputFormatters.isNotEmpty()) { |
|
|
|
foreach (var formatter in this.widget.inputFormatters) { |
|
|
|
value = formatter.formatEditUpdate(this._value, value); |
|
|
|