refactor tab menu

This commit is contained in:
Fabian Freund
2025-08-01 20:51:53 +02:00
parent f6c68b8431
commit 37f11f1bd5
15 changed files with 660 additions and 700 deletions
+6 -1
View File
@@ -23,14 +23,19 @@ class Debouncer {
final Duration debounce;
Timer? _timer;
bool _hasRan = false;
Debouncer(this.debounce);
bool get isDebouncing => _timer?.isActive ?? false;
bool get hasRan => _hasRan;
void eventOccured(void Function() callback) {
_timer?.cancel();
_timer = Timer(debounce, callback);
_timer = Timer(debounce, () {
callback.call();
_hasRan = true;
});
}
void dispose() {