Open DariosKrimsKrams opened 3 years ago
When I changed to RestClient (rest_client.dart), I run into an issue (because URL could not build correctly):
[ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: FormatException: Invalid radix-10 number (at character 1)
I could solve it by changing rest_client.dart get-method line 14 from:
rest_client.dart
return http.get(Uri.https(Endpoints.baseUrl, path)).then(_createResponse);
to
return http.get(Uri.parse(path)).then(_createResponse);
Then it's working: Loading list of posts correctly :)
When I changed to RestClient (rest_client.dart), I run into an issue (because URL could not build correctly):
[ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: FormatException: Invalid radix-10 number (at character 1)
I could solve it by changing
rest_client.dart
get-method line 14 from:return http.get(Uri.https(Endpoints.baseUrl, path)).then(_createResponse);
to
return http.get(Uri.parse(path)).then(_createResponse);
Then it's working: Loading list of posts correctly :)