Flutter Api Calling and JSON Parsing using Dio and Json Serializable

preview_player
Показать описание
In this Flutter video tutorial, I have discussed What is Api, how we can call Api in our Flutter application using Dio package, and how to parse the data coming from the server using Json Serializable.

Рекомендации по теме
Комментарии
Автор

Just wanted to add that I got an error in the initializeInterceptors() method, so I did this and done:
...onError: (error, errorInterceptorHandler)....
...onRequest: (request, requestInterceptorHandler) ...
...onResponse: (response,

kamandshayegan
Автор

You have a very clear and fluent English. You have explained the use of packages very clearly and nicely with basic examples. Thank you for the tutorial, it was quite instructive for me. I can't wait to develop 😄👏🏻

EnesARAT
Автор

Interceptor method has been changed


onRequest: (request, handler) {
print("${request.method}
return handler.next(request);
},
onResponse: (response, handler) {
print("${response.data}");
return handler.next(response);
},
onError: (error, handler) {
print("${error.message}");
return handler.next(error);
},
));

anupdey
Автор

Thanks for the tutorial, being beginner in flutter, i am able to understand Dio. I am facing one issue, 'onError' and 'onResponse' methods are not getting called only 'onRequest' is called. can you please explain this.

annapurnapriya
Автор

In initializaInterceptors() function, there were three errors for onError, onRequest, onResponse:

The argument type 'void Function(DioError)' can't be assigned to the parameter type 'void Function(DioError, ErrorInterceptorHandler)?'
The argument type 'void Function(RequestOptions)' can't be assigned to the parameter type 'void Function(RequestOptions, RequestInterceptorHandler)?'
The argument type 'void Function(Response<dynamic>)' can't be assigned to the parameter type 'void Function(Response<dynamic>,

kehanwang
Автор

I am getting a null response
I followed all the steps, able to get the json in the browser but not in the project

kaviraghul
Автор

Do you want start some advanced courses? Im ready to pay for it) Thanks for explanation and videos. And i hope you make video about retrofit library + dio integration video tutorial or about chopper library

brainman
Автор

Awesome tutorial, please change the video recorder many codes were missed

nirvanzentinal
Автор

Why use this json serializable package if we have extensions to generate the boiler plate?

aadarshainfo
Автор

How to do it on click on list and open another activity with details view of data.

amoljunghare
Автор

How to add headers using http interceptor. so that i don't have to add token on every api call that i make? Can you share code snippet with me?

hadikhan
Автор

thank you very much, I hope you do post, put, delete request in the next video

nguyenngocle
Автор

too many errors while following, is that because of latest updates?

agumonyew
Автор

Can I have demo example of this tutorial Please

ipathandroid
Автор

Error: Getter not found: 'topLevelVariable'.
return

when generating part file... pls help ?

shahinknavas
Автор

Bro can you do post request video please🙏

navasjaseer
Автор

please provide the github link of Flutter Api Calling and JSON Parsing using Dio and Json Serializable video

someshkumargupta
Автор

I think no effectiveness just efficiency to do by english language

RAHMATULLAHKHAN-zqrv