Add a better static Function type (#100)

Improves inference so it is no longer necessary to add types on the
function literal at the usage point.
diff --git a/lib/src/async_queue.dart b/lib/src/async_queue.dart
index 93899e7..eca28ad 100644
--- a/lib/src/async_queue.dart
+++ b/lib/src/async_queue.dart
@@ -31,9 +31,10 @@
   /// The handler for errors thrown during processing.
   ///
   /// Used to avoid top-leveling asynchronous errors.
-  final Function _errorHandler;
+  final void Function(Object, StackTrace) _errorHandler;
 
-  AsyncQueue(this._processor, {required Function onError})
+  AsyncQueue(this._processor,
+      {required void Function(Object, StackTrace) onError})
       : _errorHandler = onError;
 
   /// Enqueues [item] to be processed and starts asynchronously processing it
diff --git a/lib/src/directory_watcher/polling.dart b/lib/src/directory_watcher/polling.dart
index 95fb683..2a43937 100644
--- a/lib/src/directory_watcher/polling.dart
+++ b/lib/src/directory_watcher/polling.dart
@@ -70,9 +70,9 @@
   /// queue exists to let each of those proceed at their own rate. The lister
   /// will enqueue files as quickly as it can. Meanwhile, files are dequeued
   /// and processed sequentially.
-  late final AsyncQueue<String?> _filesToProcess = AsyncQueue<String?>(
-      _processFile, onError: (Object e, StackTrace stackTrace) {
-    if (!_events.isClosed) _events.addError(e, stackTrace);
+  late final AsyncQueue<String?> _filesToProcess =
+      AsyncQueue<String?>(_processFile, onError: (error, stackTrace) {
+    if (!_events.isClosed) _events.addError(error, stackTrace);
   });
 
   /// The set of files that have been seen in the current directory listing.