From d31a6242c909dcf984980313c40434c35efde192 Mon Sep 17 00:00:00 2001 From: Jonathan Rezende Date: Wed, 9 Oct 2019 16:00:39 -0300 Subject: [PATCH] analyzer error of dynamic variable to Map --- lib/src/map_from_uri.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/map_from_uri.dart b/lib/src/map_from_uri.dart index 97f1d56c..0945ce6b 100644 --- a/lib/src/map_from_uri.dart +++ b/lib/src/map_from_uri.dart @@ -25,7 +25,7 @@ buildMapFromUri(Map map, String body) { // i.e. map.foo.bar => [map, foo, bar] List keys = key.split('.'); - Map targetMap = map[keys[0]] ?? {}; + Map targetMap = map[keys[0]] != null ? map[keys[0]] as Map : {}; map[keys[0]] = targetMap; for (int i = 1; i < keys.length; i++) { if (i < keys.length - 1) {