diff --git a/lib/src/utils.dart b/lib/src/utils.dart index a5054298c..20f12fcc6 100644 --- a/lib/src/utils.dart +++ b/lib/src/utils.dart @@ -455,7 +455,7 @@ extension MapExtension on Map { /// [key] to the result. V putOrMerge(K key, V value, V Function(V oldValue, V newValue) merge) => containsKey(key) - ? this[key] = merge(this[key]!, value) + ? this[key] = merge(this[key] as V, value) : this[key] = value; }