analyzer error of dynamic variable to Map
This commit is contained in:
parent
3434b4cf59
commit
d31a6242c9
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ buildMapFromUri(Map map, String body) {
|
|||
// i.e. map.foo.bar => [map, foo, bar]
|
||||
List<String> 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) {
|
||||
|
|
Loading…
Reference in a new issue