Skip to content

Latest commit

 

History

History
56 lines (41 loc) · 1.8 KB

File metadata and controls

56 lines (41 loc) · 1.8 KB

Dio + CancelToken + Riverpod = ❤️

Did you know?

CancelToken lets you cancel HTTP requests on demand.

It's great for optimizing network usage, improving UX, and handling timeouts.

Use it to stop unnecessary data fetches when users navigate away or to implement "cancel" buttons in your Flutter apps.


CancelToken works great in combination with Riverpod.

Here's a more in-depth example showing how to implement a caching-with-timeout strategy:


Previous Next
TextField with Selection Height Style Hugeicons (4,000 stroke Flutter icons)