startOrStopCursorTimerIfNeeded method
Implementation
void startOrStopCursorTimerIfNeeded(bool hasFocus, TextSelection selection) {
if (showCursor.value &&
_cursorTimer == null &&
hasFocus &&
selection.isCollapsed) {
startCursorTimer();
} else if (_cursorTimer != null && (!hasFocus || !selection.isCollapsed)) {
stopCursorTimer();
}
}