onTextChange method

dynamic onTextChange(
  1. dynamic name,
  2. dynamic item,
  3. dynamic id,
  4. dynamic typeOwner,
  5. dynamic context,
)

Implementation

onTextChange(name, item, id, typeOwner, context) {
  //print('onTextChange $_counterTextCnt');
  if (counterTimerAlive) {
    _counterTextCnt = _counterTextMax;
    return;
  }
  if (_counterTextCnt <= -1) {
    _counterTextCnt = _counterTextMax;
  }
  counterTimerAlive = true;
  Timer.periodic(const Duration(seconds: 1), (timer) {
    _counterTextCnt--;
    if (_counterTextCnt == 0) {
      _counterTextCnt--;
      setFocusNext(
          name, item[gId], id, ((typeOwner ?? '') == gForm), context);
      myNotifyListenersAction();
      timer.cancel();
      counterTimerAlive = false;
    }
  });
}