Open RonaldTayie opened 10 months ago
I get this whenever I try to send, ina post request an Map that kas String keys and dynamic values. All efforts on my end have failed.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'int' is not a subtype of type 'String' in type cast E/flutter (16854): #0 CastMap.forEach. (dart:_internal/cast.dart:286:25) E/flutter (16854): #1 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625:13) E/flutter (16854): #2 CastMap.forEach (dart:_internal/cast.dart:285:13) E/flutter (16854): #3 mapToQuery (package:http/src/utils.dart:17:7) E/flutter (16854): #4 Request.bodyFields= (package:http/src/request.dart:137:12) E/flutter (16854): #5 BaseClient._sendUnstreamed (package:http/src/base_client.dart:87:17) E/flutter (16854): #6 BaseClient.post (package:http/src/base_client.dart:32:7) E/flutter (16854): #7 post. (package:http/http.dart:71:16) E/flutter (16854): #8 _withClient (package:http/http.dart:166:20) E/flutter (16854): #9 post (package:http/http.dart:70:5)
@RonaldTayie: are you using the package:http_client? could you write also the part how you are using it?
package:http_client
I get this whenever I try to send, ina post request an Map that kas String keys and dynamic values. All efforts on my end have failed.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'int' is not a subtype of type 'String' in type cast E/flutter (16854): #0 CastMap.forEach. (dart:_internal/cast.dart:286:25)
E/flutter (16854): #1 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625:13)
E/flutter (16854): #2 CastMap.forEach (dart:_internal/cast.dart:285:13)
E/flutter (16854): #3 mapToQuery (package:http/src/utils.dart:17:7)
E/flutter (16854): #4 Request.bodyFields= (package:http/src/request.dart:137:12)
E/flutter (16854): #5 BaseClient._sendUnstreamed (package:http/src/base_client.dart:87:17)
E/flutter (16854): #6 BaseClient.post (package:http/src/base_client.dart:32:7)
E/flutter (16854): #7 post. (package:http/http.dart:71:16)
E/flutter (16854): #8 _withClient (package:http/http.dart:166:20)
E/flutter (16854): #9 post (package:http/http.dart:70:5)