isMultiClick static method

bool isMultiClick({
  1. int intervalMilliseconds = 500,
})

Implementation

static bool isMultiClick({int intervalMilliseconds = 500}) {
  if (_lastClickTime == null ||
      DateTime.now().difference(_lastClickTime!) >
          Duration(milliseconds: intervalMilliseconds)) {
    _lastClickTime = DateTime.now();
    return false;
  }
  return true;
}