mirror of
https://github.com/flutter/flutter
synced 2024-10-13 03:32:55 +00:00
ExpansionPanelList elevation as double (#81813)
This commit is contained in:
parent
212e3f4e2e
commit
38840b41a9
|
@ -380,14 +380,8 @@ class ExpansionPanelList extends StatefulWidget {
|
|||
|
||||
/// Defines elevation for the [ExpansionPanel] while it's expanded.
|
||||
///
|
||||
/// This uses [kElevationToShadow] to simulate shadows, it does not use
|
||||
/// [Material]'s arbitrary elevation feature.
|
||||
///
|
||||
/// The following values can be used to define the elevation: 0, 1, 2, 3, 4, 6,
|
||||
/// 8, 9, 12, 16, 24.
|
||||
///
|
||||
/// By default, the value of elevation is 2.
|
||||
final int elevation;
|
||||
final double elevation;
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _ExpansionPanelListState();
|
||||
|
@ -560,7 +554,7 @@ class _ExpansionPanelListState extends State<ExpansionPanelList> {
|
|||
return MergeableMaterial(
|
||||
hasDividers: true,
|
||||
dividerColor: widget.dividerColor,
|
||||
elevation: widget.elevation.toDouble(),
|
||||
elevation: widget.elevation,
|
||||
children: items,
|
||||
);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ class SimpleExpansionPanelListTestWidget extends StatefulWidget {
|
|||
final Key? secondPanelKey;
|
||||
final bool canTapOnHeader;
|
||||
final Color? dividerColor;
|
||||
final int elevation;
|
||||
final double elevation;
|
||||
|
||||
/// If null, the default [ExpansionPanelList]'s expanded header padding value is applied via [defaultExpandedHeaderPadding]
|
||||
final EdgeInsets? expandedHeaderPadding;
|
||||
|
@ -1397,7 +1397,7 @@ void main() {
|
|||
});
|
||||
|
||||
testWidgets('elevation is propagated properly to MergeableMaterial', (WidgetTester tester) async {
|
||||
const int _elevation = 8;
|
||||
const double _elevation = 8;
|
||||
|
||||
// Test for ExpansionPanelList.
|
||||
await tester.pumpWidget(const MaterialApp(
|
||||
|
|
Loading…
Reference in a new issue