Loading topic
ListView and GridView are convenient wrappers around them. Once you know the pieces, errors such as "Vertical viewport was given unbounded height" become predictable instead of mysteri5 min readListView constructor, which takes an explicit list of children. It assumes you can write basic Dart (lists, closures), know StatelessWidget and StatefulWidget, are comfortable with Row, Column and Expanded, and can run an app with hot reload.5 min readListView and GridView: scrollDirection, padding and reverse. It assumes you can build a basic ListView, know how Row, Column and Expanded pass constraints, and can run a Flutter app with hot reload. You will use these argume5 min readRow, Column and Expanded, and that you have built a basic ListView. It explains why a scrollable inside a Column throws an error, and it covers three fixes with their costs.4 min readStatefulWidget and setState, and the basic ListView(children: [...]) constructor from earlier chapters. You should also be able to run a Flutter app and use hot reload.5 min readListView.builder, that you know itemBuilder receives a BuildContext and an index, and that you can run a Flutter app with hot reload. It covers how ListView.separated works, how to choose between dividers and gaps, how to vary separators by position4 min readRow, Column and Expanded pass constraints, and have used ListView with a children list. It covers the two shortcut constructors for building a grid from a fixed list of widgets: GridView.count and GridView.extent.5 min readStatelessWidget and StatefulWidget, and how Row, Column and Expanded lay out children. You should also have met GridView.count and GridView.extent. Here you will learn what a grid delegate is, which two built-in delegates5 min readListView.builder pattern, StatelessWidget and StatefulWidget, and how Expanded works inside a Column. Here you will build large grids that create only the tiles on screen, choose between the two common grid delegates, and avoid the mistakes that make a gri5 min readListView or GridView, write a StatefulWidget with initState and dispose, and read a closure. You will learn how a ScrollController reports where a scrollable is and how it moves the scrollable. You will also learn which errors come up when you use one5 min readListView.builder, ScrollController, and StatefulWidget with setState. It also assumes you can write an async function in Dart.4 min readListView and GridView, and that you know what a ScrollController is. Here you will learn what decides how a list feels when you drag, fling or overscroll it, and how to change that behavior for one list or for the whole app.4 min readRefreshIndicator widget. This chapter covers how it works, how to wire it to a list, and the errors that stop it from appearing. It assumes you can write a StatefulWidget, use `as4 min readStatefulWidget classes and use ListView.builder as covered in earlier chapters. Knowing that Flutter has a widget tree and an element tree 5 min readListView.builder, you know the difference between a StatelessWidget and a StatefulWidget, and you have run an app in profile mode at least once. It covers why lazy lists are cheap, what still makes them slow, and how to measure the difference.5 min readListView and GridView each scroll one kind of content. Real screens often need more: a collapsing app bar, a short list of featured items, then a grid of products, all moving as one scroll. This chapter shows how CustomScrollView and slivers do that.5 min read