-
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: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
Use case
I'd like to use an ExpansionPanelList without any gaps / spaces between their elements.
Proposal
I'd like to define a gapHeight that will be passed to the MaterialGap widget that is placed between the expanded ExpansionPanel children of the ExpansionPanelList.
I can set the expandedHeaderPadding, but it will only influence the padding of the first header. Setting elevation does not solve the problem either, because the ExpansionPanelList does this in its build function:
if (_isChildExpanded(index) && index != 0 && !_isChildExpanded(index - 1))
items.add(MaterialGap(key: _SaltedKey<BuildContext, int>(context, index * 2 - 1)));MaterialGap accepts a size property in its constructor, so I wonder why there is no property on the ExpandedPanelList that allows me to set the size of those MaterialGaps.
Illustration
I don't want these ExpandedPanels to move when expanding. This is the closest I can get:
ExpansionPanelList(
elevation: 0,
dividerColor: Colors.transparent,
expandedHeaderPadding: const EdgeInsets.symmetric(vertical: 0),
expansionCallback: (int index, bool isExpanded) {
setState(() {
_expanded[index] = !isExpanded;
});
},
children: panels,
);Additional context
Please see:
- https://stackoverflow.com/questions/60555041/is-there-a-way-to-get-rid-of-the-spacing-between-expansion-panels-when-expanded
- https://stackoverflow.com/questions/72822297/how-to-remove-space-between-expanded-expansionpanels-in-expansionpanellist
- https://stackoverflow.com/questions/60463999/flutterhow-to-remove-elevation-from-expansionpanellist
KristijanZic and trannzfsg
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: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
