|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public bool cursorCurrentlyVisible { |
|
|
|
get { return this._cursorVisibilityNotifier.value; } |
|
|
|
get { return this._cursorBlinkOpacityController.value > 0; } |
|
|
|
} |
|
|
|
|
|
|
|
public TimeSpan cursorBlinkInterval { |
|
|
|
|
|
|
int _obscureLatestCharIndex; |
|
|
|
|
|
|
|
void _cursorTick() { |
|
|
|
this._targetCursorVisibility = !this._targetCursorVisibility; |
|
|
|
this._targetCursorVisibility = !this._unityKeyboard() && !this._targetCursorVisibility; |
|
|
|
float targetOpacity = this._targetCursorVisibility ? 1.0f : 0.0f; |
|
|
|
if (this.widget.cursorOpacityAnimates) { |
|
|
|
this._cursorBlinkOpacityController.animateTo(targetOpacity, curve: Curves.easeOut); |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this._cursorVisibilityNotifier.value = !this._unityKeyboard() && !this._cursorVisibilityNotifier.value; |
|
|
|
if (this._obscureShowCharTicksPending > 0) { |
|
|
|
this.setState(() => { this._obscureShowCharTicksPending--; }); |
|
|
|
} |
|
|
|
|
|
|
void _startCursorTimer() { |
|
|
|
this._targetCursorVisibility = true; |
|
|
|
this._cursorBlinkOpacityController.setValue(1.0f); |
|
|
|
this._cursorVisibilityNotifier.value = !this._unityKeyboard(); |
|
|
|
if (EditableText.debugDeterministicCursor) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
this._cursorTimer = null; |
|
|
|
this._targetCursorVisibility = false; |
|
|
|
this._cursorBlinkOpacityController.setValue(0.0f); |
|
|
|
this._cursorVisibilityNotifier.value = false; |
|
|
|
if (EditableText.debugDeterministicCursor) { |
|
|
|
return; |
|
|
|
} |
|
|
|