Unverified Commit 97e58ecb authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Make expansion panel have a minHeight instead (#18623)

parent fb8cbf21
......@@ -143,8 +143,8 @@ class ExpansionPanelList extends StatelessWidget {
duration: animationDuration,
curve: Curves.fastOutSlowIn,
margin: _isChildExpanded(index) ? kExpandedEdgeInsets : EdgeInsets.zero,
child: new SizedBox(
height: _kPanelHeaderCollapsedHeight,
child: new ConstrainedBox(
constraints: const BoxConstraints(minHeight: _kPanelHeaderCollapsedHeight),
child: children[index].headerBuilder(
context,
children[index].isExpanded,
......
......@@ -126,17 +126,25 @@ void main() {
animationDuration: kSizeAnimationDuration,
children: <ExpansionPanel>[
new ExpansionPanel(
headerBuilder: (BuildContext context, bool isExpanded) => const Placeholder(),
body: const SizedBox(height: 100.0, child: const Placeholder()),
headerBuilder: (BuildContext context, bool isExpanded) => const Placeholder(
fallbackHeight: 12.0,
),
body: const SizedBox(height: 100.0, child: const Placeholder(
fallbackHeight: 12.0,
)),
isExpanded: a,
),
new ExpansionPanel(
headerBuilder: (BuildContext context, bool isExpanded) => const Placeholder(),
headerBuilder: (BuildContext context, bool isExpanded) => const Placeholder(
fallbackHeight: 12.0,
),
body: const SizedBox(height: 100.0, child: const Placeholder()),
isExpanded: b,
),
new ExpansionPanel(
headerBuilder: (BuildContext context, bool isExpanded) => const Placeholder(),
headerBuilder: (BuildContext context, bool isExpanded) => const Placeholder(
fallbackHeight: 12.0,
),
body: const SizedBox(height: 100.0, child: const Placeholder()),
isExpanded: c,
),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment