Closed LogicKahanHai closed 4 months ago
type 'String' is not a subtype of type 'Map<dynamic, dynamic>?' in type cast
The issue arose because map[responseBody] had a runtimeType of String and it was being casted to a Map.
map[responseBody]
String
Map
The fix: using jsonDecode() method of dart:convert I converted the string to a Map
jsonDecode()
dart:convert
Hello Developers! Please tell me if there something wrong with my submission. I am new to contributing to open source projects.
335
type 'String' is not a subtype of type 'Map<dynamic, dynamic>?' in type cast
The issue arose because
map[responseBody]
had a runtimeType ofString
and it was being casted to aMap
.The fix: using
jsonDecode()
method ofdart:convert
I converted the string to a Map