8
The Future is Now: Introduction to Asynchronous Programming
Asynchronous programming allows your app to complete time-consuming tasks, such as retrieving an image from the web, or writing some data to a web server, while running other tasks in parallel and responding to the user input. This improves the user experience and the overall quality of your software.
In Dart and Flutter, you can write asynchronous code leveraging Futures, and the async/await pattern: these patterns exist in most modern programming languages, but Flutter also has a very efficient way to build the user interface asynchronously using the FutureBuilder
class.
In Chapter 10, Advanced State Management with Streams, we will also focus on streams, which are another way ...
Get Flutter Cookbook - Second Edition 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.