-
Taha Tesser authored
This updates the previous attempt https://github.com/flutter/flutter/pull/135855 and removes the complications when testing M3 ink sparkle effect. Thanks to this [PR](https://github.com/flutter/flutter/pull/138757) by @Piinks fixes [ExpansionTile InkSplash doesn't respect Shape's borderRadius](https://github.com/flutter/flutter/issues/125779) fixes [`ExpansionTile.backgroundColor` & `ExpansionTile.collapsedBackgroundColor` removes splash effect](https://github.com/flutter/flutter/issues/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">
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
lib | ||
test | ||
test_fixes | ||
test_private | ||
test_profile | ||
test_release | ||
LICENSE | ||
README.md | ||
analysis_options.yaml | ||
build.yaml | ||
dart_test.yaml | ||
pubspec.yaml |