Unverified Commit 38840b41 authored by Abhishek Ghaskata's avatar Abhishek Ghaskata Committed by GitHub

ExpansionPanelList elevation as double (#81813)

parent 212e3f4e
...@@ -380,14 +380,8 @@ class ExpansionPanelList extends StatefulWidget { ...@@ -380,14 +380,8 @@ class ExpansionPanelList extends StatefulWidget {
/// Defines elevation for the [ExpansionPanel] while it's expanded. /// 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. /// By default, the value of elevation is 2.
final int elevation; final double elevation;
@override @override
State<StatefulWidget> createState() => _ExpansionPanelListState(); State<StatefulWidget> createState() => _ExpansionPanelListState();
...@@ -560,7 +554,7 @@ class _ExpansionPanelListState extends State<ExpansionPanelList> { ...@@ -560,7 +554,7 @@ class _ExpansionPanelListState extends State<ExpansionPanelList> {
return MergeableMaterial( return MergeableMaterial(
hasDividers: true, hasDividers: true,
dividerColor: widget.dividerColor, dividerColor: widget.dividerColor,
elevation: widget.elevation.toDouble(), elevation: widget.elevation,
children: items, children: items,
); );
} }
......
...@@ -20,7 +20,7 @@ class SimpleExpansionPanelListTestWidget extends StatefulWidget { ...@@ -20,7 +20,7 @@ class SimpleExpansionPanelListTestWidget extends StatefulWidget {
final Key? secondPanelKey; final Key? secondPanelKey;
final bool canTapOnHeader; final bool canTapOnHeader;
final Color? dividerColor; final Color? dividerColor;
final int elevation; final double elevation;
/// If null, the default [ExpansionPanelList]'s expanded header padding value is applied via [defaultExpandedHeaderPadding] /// If null, the default [ExpansionPanelList]'s expanded header padding value is applied via [defaultExpandedHeaderPadding]
final EdgeInsets? expandedHeaderPadding; final EdgeInsets? expandedHeaderPadding;
...@@ -1397,7 +1397,7 @@ void main() { ...@@ -1397,7 +1397,7 @@ void main() {
}); });
testWidgets('elevation is propagated properly to MergeableMaterial', (WidgetTester tester) async { testWidgets('elevation is propagated properly to MergeableMaterial', (WidgetTester tester) async {
const int _elevation = 8; const double _elevation = 8;
// Test for ExpansionPanelList. // Test for ExpansionPanelList.
await tester.pumpWidget(const MaterialApp( await tester.pumpWidget(const MaterialApp(
......
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