Using the CircularProgressIndicator

In those screenshots you see what the app looks like when everything has finished loading, but we also need to think about what it looks like while it’s still in the process of loading: we currently display a Divider when it’s loading each tile, but that isn’t really visually pleasing if the user is on a slow network and will therefore look at many dividers stacked on top of each other for a few seconds.

There is a class specifically meant to be used for this placeholder task: the CircularProgressIndicator.[40] It’s not the only progress indicator: there is also a LinearProgressIndicator, but it’s less common and less flexible.

You can just place its constructor (CircularProgressIndicator) anywhere you want ...

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.