-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
We have learned from user studies that delegates can be intimidating or complex for users, especially if they are learning flutter.
We have also been working on making it easier for users to compose efficient scrolling widgets - one way in particular is to make slivers more approachable so that it is easier to refactor code and avoid things like shrinkwrap.
Many slivers require delegates to be provided by the user. In non-sliver classes like ListView and GridView, convenience constructors create the delegate for the user.
- ListView
- list of children creates a SliverListChildDelegate
builderconstructor creates a SliverChildBuilderDelegate
- GridView
countcreates a SliverGridDelegateWithCrossAxisCountextentcreates a SliverGridDelegateWithMaxCrossAxisExtent
- ... and so on
We should add convenience constructors like these to the Sliver classes that require delegates. Users can still provide their own delegate if they choose, but if we can facilitate taking care of the delegate for folks, it may make slivers more friendly. :)
cc interested parties @jonahwilliams @dnfield @goderbauer @InMatrix @gspencergoog
Metadata
Metadata
Assignees
Labels
Type
Projects
Status