Logo
Explore Help
Register Sign In
yujunjun/AppFlowy
1
0
Fork 0
You've already forked AppFlowy
mirror of https://github.com/AppFlowy-IO/AppFlowy.git synced 2025-07-23 09:01:21 +00:00
Code Issues Packages Projects Releases Wiki Activity
AppFlowy/frontend/appflowy_flutter/lib/util/debounce.dart

24 lines
336 B
Dart
Raw Permalink Normal View History

chore: sync release 0.1.1 (#2075)
2023-03-22 14:49:15 +08:00
import 'dart:async';
class Debounce {
Debounce({
this.duration = const Duration(milliseconds: 1000),
});
chore: code cleanup according to unintroduced lints (#4488) * chore: remove redundant arguments * chore: remove unused constructor params * chore: reorganize constructors * chore: remove unnecessary awaits in returns * chore: remove unnecessary paranthesis * chore: add lints * chore: clean up after merge * chore: add sort constructors first * chore: organize constructors in blocs * chore: use sizedbox.shrink over empty container
2024-01-25 16:37:36 +01:00
final Duration duration;
Timer? _timer;
fix: doc state refresh (#5086)
2024-04-08 14:06:05 +08:00
void call(Function action) {
chore: sync release 0.1.1 (#2075)
2023-03-22 14:49:15 +08:00
dispose();
fix: doc state refresh (#5086)
2024-04-08 14:06:05 +08:00
chore: sync release 0.1.1 (#2075)
2023-03-22 14:49:15 +08:00
_timer = Timer(duration, () {
action();
});
}
void dispose() {
_timer?.cancel();
_timer = null;
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.5 Page: 1648ms Template: 27ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API