Add rule override

Update core

Optimize more details
This commit is contained in:
chen08209
2025-03-12 17:15:31 +08:00
parent b6c7b15e3e
commit ef5f6dbd59
145 changed files with 7710 additions and 2404 deletions

View File

@@ -1,7 +1,7 @@
import 'dart:async';
class Debouncer {
final Map<dynamic, Timer> _operations = {};
final Map<dynamic, Timer?> _operations = {};
call(
dynamic tag,
@@ -28,14 +28,15 @@ class Debouncer {
cancel(dynamic tag) {
_operations[tag]?.cancel();
_operations[tag] = null;
}
}
class Throttler {
final Map<dynamic, Timer> _operations = {};
final Map<dynamic, Timer?> _operations = {};
call(
String tag,
dynamic tag,
Function func, {
List<dynamic>? args,
Duration duration = const Duration(milliseconds: 600),
@@ -60,6 +61,7 @@ class Throttler {
cancel(dynamic tag) {
_operations[tag]?.cancel();
_operations[tag] = null;
}
}