Commit 9574d58
authored
Fix
This updates the previous attempt flutter/flutter#135855 and removes the complications when testing M3 ink sparkle effect.
Thanks to this [PR](flutter/flutter#138757) by @Piinks
fixes [ExpansionTile InkSplash doesn't respect Shape's borderRadius](flutter/flutter#125779)
fixes [`ExpansionTile.backgroundColor` & `ExpansionTile.collapsedBackgroundColor` removes splash effect](flutter/flutter#107113)
### Code sample
<details>
<summary>expand to view the code sample</summary>
```dart
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@OverRide
Widget build(BuildContext context) {
return const MaterialApp(
debugShowCheckedModeBanner: false,
home: Example(),
);
}
}
class Example extends StatelessWidget {
const Example({super.key});
@OverRide
Widget build(BuildContext context) {
return const Scaffold(
body: Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 24.0),
child: ExpansionTile(
collapsedBackgroundColor: Color(0x25ff0000),
backgroundColor: Color(0x250000ff),
collapsedShape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(30.0)),
side: BorderSide(color: Colors.black, width: 2.0),
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(30.0)),
side: BorderSide(color: Colors.black, width: 2.0),
),
clipBehavior: Clip.hardEdge,
title: Text('Expansion Tile'),
children: <Widget>[
FlutterLogo(size: 50),
FlutterLogo(size: 50),
FlutterLogo(size: 50),
FlutterLogo(size: 50),
],
),
)),
);
}
}
```
</details>
### Before
<img width="789" alt="Screenshot 2024-01-18 at 18 16 15" src="https://github.com/flutter/flutter/assets/48603081/8c6a6f1e-6986-4acf-8dec-e223a682c0d7">
<img width="789" alt="Screenshot 2024-01-18 at 18 16 44" src="https://github.com/flutter/flutter/assets/48603081/f55f6a26-2128-48a1-b24d-3c14e4f6ecdc">
### After
<img width="789" alt="Screenshot 2024-01-18 at 18 20 27" src="https://github.com/flutter/flutter/assets/48603081/7ec8b888-7319-460d-8488-9cd44c9246a6">
<img width="789" alt="Screenshot 2024-01-18 at 18 20 53" src="https://github.com/flutter/flutter/assets/48603081/80d66d5b-7eb2-4f47-ab4d-d7f469a731fa">shape and collapsedShape isn't applied to ExpansionTile's splash ink (#141777)1 parent 634b326 commit 9574d58
File tree
3 files changed
+270
-104
lines changed- packages/flutter
- lib/src/material
- test/material
3 files changed
+270
-104
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
478 | 481 | | |
479 | | - | |
| 482 | + | |
480 | 483 | | |
481 | 484 | | |
482 | 485 | | |
| |||
656 | 659 | | |
657 | 660 | | |
658 | 661 | | |
| 662 | + | |
659 | 663 | | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
664 | 668 | | |
665 | 669 | | |
666 | 670 | | |
| |||
679 | 683 | | |
680 | 684 | | |
681 | 685 | | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
688 | 693 | | |
689 | 694 | | |
690 | 695 | | |
| |||
720 | 725 | | |
721 | 726 | | |
722 | 727 | | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
723 | 745 | | |
724 | 746 | | |
725 | 747 | | |
| |||
0 commit comments