Making Everything Faster by Caching to Local Storage
Our app works, but it is very slow because it downloads everything every time, and that wastes the user’s time and data.
To make our app more efficient, we’ll have to save the comics to a local cache and retrieve them from there before trying to get them from the Internet. If the needed comic isn’t already saved, we’ll download it from the Internet.
An Introduction to the path_provider Package
Mobile apps can store data in two directories: a temporary cache directory (which is what we’ll use for this example) or a permanent Data/Documents directory (which is meant to be used for permanent storage of user data). The difference between those two directories is that the cache directory may be ...
Get Programming Flutter now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.