zubairehman / flutter_boilerplate_project

A boilerplate project created in flutter using MobX and Provider.
http://zubairehman.surge.sh/
MIT License
2.26k stars 905 forks source link

getPosts with dioClient vs restClient #102

Closed gc-robotics closed 3 years ago

gc-robotics commented 3 years ago

Get_posts.dart is implemented using _dioClient, but it has a commented section that shows an implementation based on _restClient.

When to use one or the other?

thanks.

zubairehman commented 3 years ago

Hi @gc-robotics,

You can use either one of the provided clients, the rest_client implementation is commented on because it's just to give an idea on how to make a network call using the rest_client.

Thanks.