isBeyondClickInterval method

bool isBeyondClickInterval()

Implementation

bool isBeyondClickInterval(){
  int currentMill = DateTime.now().millisecondsSinceEpoch;
  if (lastMill == null) {
    lastMill = currentMill;
    return true;
  }

  int interval = currentMill - (lastMill ?? 0);
  if (interval >= (widget.minClickIntervalMill ?? 600)) {
    lastMill = currentMill;
    return true;
  }

  print("最少时间间隔${widget.minClickIntervalMill}不满足");
  return false;
}