throttleFunction static method
防重复提交, 默认一秒【节流】
Implementation
static void throttleFunction(Function fn, {int milliseconds = 1000}) {
throttleBehaviorSubject.add(null);
if (throttleBehaviorSubject.hasListener == false) {
throttleBehaviorSubject
.throttleTime(Duration(milliseconds: milliseconds))
.listen((value) {
fn.call();
});
}
}