Unverified Commit e57f57c7 authored by rami-a's avatar rami-a Committed by GitHub

Add elevation to Chips to allow for more flexibility (#27316)

Expose elevation on chips and allow for it to be customized by the developer.
parent fac051c7
This diff is collapsed.
......@@ -1484,7 +1484,7 @@ void main() {
final ChipThemeData chipTheme = theme.chipTheme;
InputChip inputChip = const InputChip(label: Text('Label'), pressElevation: 8.0);
InputChip inputChip = const InputChip(label: Text('Label'));
Widget buildChip(ChipThemeData data) {
return _wrapForChip(
......@@ -1498,12 +1498,18 @@ void main() {
await tester.pumpWidget(buildChip(chipTheme));
expect(inputChip.pressElevation, 8.0);
expect(inputChip.elevation, 0.0);
inputChip = const InputChip(label: Text('Label'), pressElevation: 12.0);
inputChip = const InputChip(
label: Text('Label'),
pressElevation: 12.0,
elevation: 4.0,
);
await tester.pumpWidget(buildChip(chipTheme));
await tester.pumpAndSettle();
expect(inputChip.pressElevation, 12.0);
expect(inputChip.elevation, 4.0);
});
testWidgets('can be tapped outside of chip body', (WidgetTester tester) async {
......
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