-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.
Description
Use case
When using a DraggableScrollableSheet with dynamic content, there's no way to set the maxChildSize parameter to the height of the builder's content.
- If the data shown inside the widget is short, setting
maxChildSizeto1.0will show too much blank space when scrolled to the top. - If the data shown inside the widget is long, setting
maxChildSizeto0.5will not show all the content inside the sheet.
Proposal
Add a boolean parameter which:
- If
false, the behavior will remain unchanged. - If
true, ignores themaxChildSize(could also assert/warn) and sets the max size of the widget to the extent of the content.- If there's a lot of content, the result will be the same as setting
maxChildSizeto1.0. - If there isn't too much content, the max size of the sheet will be the size of the content inside the sheet.
- If there's a lot of content, the result will be the same as setting
The behavior will be something similar to the Column's mainAxisSize parameter when set to MainAxisSize.min.
cc/ @dnfield
enolcasielles, filipevl, srombs, befirst, mayoljonathan and 44 more
Metadata
Metadata
Assignees
Labels
c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.