From a705445f0d84871e175a5f0b617bd5f9aedb941e Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Sat, 3 Sep 2022 00:17:39 +0200 Subject: [PATCH] Avoid null check on potentially nullable type parameter --- lib/src/utils.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }