How to use Flutter’s FutureBuilder properly
When developing a Flutter app, there might be a need to display data that is not instantly available. This data needs to be prepared asynchronously to prevent freezing of the app. And while the data is being prepared, we want to display an indicator so the user knows that their data is being loaded. Fortunately, the Flutter framework has FutureBuilder widget that fits well for this use case. The official documentation does provide explanations on how to use the FutureBuilder, but I find that turning it into a set of practical rules makes it easier to follow especially to avoid the misusages....