Make expansion panel have a minHeight instead (#18623)
This commit is contained in:
parent
fb8cbf216b
commit
97e58ecb2c
@ -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,
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user