Layouts

This section discusses different layouts in Flutter
and how they compare with UIKit.

Displaying a list view

In UIKit, you might show a list in
either a UITableView or a UICollectionView.
In Flutter, you have a similar implementation using a ListView.
In UIKit, these views have delegate methods
for deciding the number of rows,
the cell for each index path, and the size of the cells.

Due to Flutter’s immutable widget pattern,
you pass a list of widgets to your ListView,
and Flutter takes care of making sure that
scrolling is fast and smooth.

Detecting what was clicked

In UIKit, you implement the delegate method,
tableView:didSelectRowAtIndexPath:.
In Flutter, use the touch handling provided by the passed-in widgets.

Dynamically updating ListView