Flutter How to create, for a rest api, nested json response class?
Using Flutter, I would like to read a nested rest api.
I’m just learning Flutter and I can’t map response data for use [closed]
Closed 37 secs ago.
Facing DioException: HttpException: Connection closed while receiving data in Flutter when adding token to header
I am trying to call an API in Flutter using the Dio package, but I encounter the following error when adding a token to the header:
Dio (HttpClient) cannot set a self-signed trust certificate
Code snippet:
flutter dio: The XMLHttpRequest onError callback was called
I met an error when I am using Dio. Below is my code:
Flutter Dio upload file gets `type ‘List’ is not a subtype of type ‘Uint8List’` error
I try to upload a file with Flutter in Web with Dio. I get the file with file_picker
and get the bytes of the file. Then I try to upload the file to my backend but I got an error saying Instance of 'JSArray<int>': type 'List<int>' is not a subtype of type 'Uint8List'