fixed maxBy compare param signature (#224)

diff --git a/lib/src/functions.dart b/lib/src/functions.dart
index ec5f5d8..64a38ee 100644
--- a/lib/src/functions.dart
+++ b/lib/src/functions.dart
@@ -87,14 +87,14 @@
 ///
 /// Returns `null` if [values] is empty.
 S? maxBy<S, T>(Iterable<S> values, T Function(S) orderBy,
-    {int? Function(T, T)? compare}) {
+    {int Function(T, T)? compare}) {
   compare ??= defaultCompare;
 
   S? maxValue;
   T? maxOrderBy;
   for (var element in values) {
     var elementOrderBy = orderBy(element);
-    if (maxOrderBy == null || compare(elementOrderBy, maxOrderBy)! > 0) {
+    if (maxOrderBy == null || compare(elementOrderBy, maxOrderBy) > 0) {
       maxValue = element;
       maxOrderBy = elementOrderBy;
     }