722 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
63
views
Flutter Dio interceptor issue
class ApiClient {
final Dio dio;
final FlutterSecureStorage storage;
ApiClient(this.dio, this.storage) {
print('ApiClient constructor is being called');
dio.options = BaseOptions(
...
2
votes
0
answers
107
views
flutter version 3.38.2 slow api calls
A dio.get() call that takes only 150 ms with curl blocks for 6–8 seconds on the client side.
The pause happens before Dio prints the first REQUEST log line, so the delay is not caused by DNS, TLS, or ...
2
votes
1
answer
80
views
Token refresh with dio fails (sometimes)
This is the code of AuthInterceptor which I use for triggering token refreshing. For safety (that I the interceptor of main dio instance won't attach accesstoken to refresh token api) I even use a ...
0
votes
1
answer
71
views
How to handle http post violations and show them on the screen
I'm learning Flutter and this is how I handle a post http request right now
ApartmentRepository class:
Future<bool> createApartment(Apartment apartment) async {
String path = baseUrl;
...
hous's user avatar
- 2,776
1
vote
1
answer
171
views
Flutter Dio: Do not log error to Sentry on Cancel Token error
I have some cases in which I am cancelling the token for certain API requests. This is treated by Sentry as an error and being logged into Sentry.
I would like cancel token errors to not be logged.
I ...
-1
votes
0
answers
46
views
Flutter:DOI - Why it keep sending 200 Response to Catch Block
So i am using Swagger Documentation and OpenAPI CLI Tool to auto generate Api Call etc Logics
final response = await _api
.getAuthenticationApi()
.authControllerRegisterV1(
...
1
vote
0
answers
83
views
Unexpected character (at line X, character Y) with no clear source
I'm using Flutter, Dio, and Retrofit in an MVVM architecture.
Recently, I started getting this error:
FormatException: Unexpected character (at line 146, character 3)
The debug console shows no ...
0
votes
0
answers
91
views
Getting Grafana Faro's HTTP logging inside of a dart isolate
Imagine I have a flutter application using faro-flutter-sdk to get logging and event tracking in iOS/Android devices. We use Dio for all of our HTTP requests, so, as long as we set HttpOverrides....
1
vote
2
answers
184
views
How to solve exception "toJson() method have to add to MultipartFile" when uploading image?
I'm using the retrofit package with dio in Flutter to upload a file using @MultiPart() and MultipartFile. But when I run build_runner, I get this error:
retrofit_generator on lib/features/schedule/...
3
votes
0
answers
106
views
Displaying an exception while using try catch
I have an application that I used dio and made a try catch on DioException, but it still shows an exception from the dio mixin, even though I did everything correctly. It still shows it, and when I ...
0
votes
1
answer
241
views
Token refresh in Flutter with Dio interceptor
I'd need some help regarding token refresh in Flutter app which uses built-in Provider and Dio package. I use MVVM architecture with repositories and services as data layer.
I use go_router and its ...
2
votes
1
answer
59
views
Dio upload (POST) request isn't sent
I have an issue with existing code, which worked in the past but suddenly stopped working.
I am trying to upload, using dio, but the request isn't getting sent anymore.
This would be the method called:...
0
votes
0
answers
34
views
Error reading MIME multipart body part in flutter
public async Task<CommonResponse> Registration()
{
CommonResponse response = new CommonResponse();
try
{
if (!Request.Content.IsMimeMultipartContent())
{
response....
1
vote
0
answers
62
views
exception error when using imgur on flutter web
i am implementing image upload in my app. i want to use imgur's api. i got the code from the postman collection in their docs. but i am getting - DioException [connection error]: The connection ...
0
votes
0
answers
62
views
How to test HttpClient with badCertificateCallback and SecurityContext in Flutter?
I'm trying to write a test for a function that configures a Dio instance to accept all SSL certificates, including those that are invalid or self-signed.
I have the following extension on Dio:
...