throttle method

ThrottleInvoker throttle({
  1. int milliseconds = 500,
})

节流:窗口期内只执行一次(领先沿触发)。 返回对象支持:直接调用、.cancel()

Implementation

ThrottleInvoker throttle({int milliseconds = 500}) {
  return ThrottleInvoker(this, Duration(milliseconds: milliseconds));
}