Chapter 9. Async Dart and Flutter and infinite scrolling

This chapter covers

  • Futures in Dart
  • Streams and sinks in Dart
  • Async builder in Flutter
  • Slivers and scrollable widgets
  • Scroll physics

This chapter could contain the most difficult concepts to wrap your head around, unless you’re familiar with async UI programming. The beginning of this chapter is only about asynchronous concepts and implementing them in Dart. After that, I examine how those concepts are useful in Flutter.

Note

If you’re okay with the following code listing, then you should skip to section 9.2, where we begin the Flutter portion.

Listing 9.1. Example Dart code using streams and sinks
// Streams and Sinks StreamController<bool> _controller = StreamController<bool>(); ...

Get Flutter in Action 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.