Add convenience constructors to slivers that require delegates #113107
Labels
c: new feature
Nothing broken; request for a new capability
c: proposal
A detailed proposal for a change to Flutter
f: scrolling
Viewports, list views, slivers, etc.
framework
flutter/packages/flutter repository. See also f: labels.
from: study
Reported in a UX study
P3
Issues that are less important to the Flutter project
Uh oh!
There was an error while loading. Please reload this page.
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.
builder
constructor creates a SliverChildBuilderDelegatecount
creates a SliverGridDelegateWithCrossAxisCountextent
creates a SliverGridDelegateWithMaxCrossAxisExtentWe 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
The text was updated successfully, but these errors were encountered: