Member-only story
Better Asynchronous Operations
A slick built-in means to handle Asynchronous Operations
Table of Contents
· Async in the Mix
· From The Start
· Initiate Your Future
· Another Future
· Four Futures
· Build Your Future
· One Future Once
· Your Future Platform
· TL;DR
· A Stateful Future
· Wait For It
· It’s Your Future
· Build Again
Async in the Mix
I’ve written up an example app in the GitHub repository called, inheritedwidget_state_mixin_example. It initially highlighted the Mixin, inheritedwidget_state_mixin, as it provides a built-in InheritedWidget to your State object for more efficient interface rebuilds. It has its own article called, The InheritedWidget Mixin, discussing its use and its features.
However, the example app used another Mixin as well. One which provided another built-in feature to your State object. This time, it’s a FutureBuilder Widget. That’s what this article will talk about. If you’re not interested, at least this article will demonstrate using a Mixin to you, and a code walk through on how the FutureBuilder Widget works. The screenshot below is of that Mixin where a FutureBuilder Widget resides in the State object’s build() function.