INNER CODE UNIT · Dart

_CodeCursorBlinkController

reqable/re-editor · lib/src/_code_editable.dart:449

class _CodeCursorBlinkController extends ValueNotifier<bool> {

  Timer? _timer;

  _CodeCursorBlinkController() : super(false);

  void startBlink() {
    if (_timer != null) {
      _timer!.cancel();
    }
    _timer = Timer.periodic(_kCursorBlinkHalfPeriod, _cursorTick);
    if (kIsAndroid || kIsIOS) {
      // Wait selection position to update
      Future.delayed(const Duration(milliseconds: 100), () {
        value = true;
      });
    } else {
      value = true;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…