add null check to debounce
This commit is contained in:
@@ -12,6 +12,10 @@ void debounce({
|
|||||||
List positionalArguments,
|
List positionalArguments,
|
||||||
Map<Symbol, dynamic> namedArguments,
|
Map<Symbol, dynamic> namedArguments,
|
||||||
}) {
|
}) {
|
||||||
|
if (target == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (timeouts.containsKey(target)) {
|
if (timeouts.containsKey(target)) {
|
||||||
timeouts[target].cancel();
|
timeouts[target].cancel();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user