|
5 | 5 | import 'package:flutter/material.dart';
|
6 | 6 | import 'package:flutter_test/flutter_test.dart';
|
7 | 7 |
|
8 |
| -import '../rendering/mock_canvas.dart'; |
9 |
| - |
10 | 8 | class TestIcon extends StatefulWidget {
|
11 | 9 | const TestIcon({super.key});
|
12 | 10 |
|
@@ -483,51 +481,6 @@ void main() {
|
483 | 481 | expect(columnRect.bottom, paddingRect.bottom - 4);
|
484 | 482 | });
|
485 | 483 |
|
486 |
| - testWidgets('ExpansionTile adds a Material widget above its children when expanded', (WidgetTester tester) async { |
487 |
| - // Regression test for https://github.com/flutter/flutter/issues/107030 |
488 |
| - const Color childColor = Color(0xff4caf50); |
489 |
| - |
490 |
| - await tester.pumpWidget( |
491 |
| - const MaterialApp( |
492 |
| - home: Material( |
493 |
| - child: Center( |
494 |
| - child: ExpansionTile( |
495 |
| - title: Text('title'), |
496 |
| - childrenPadding: EdgeInsets.fromLTRB(10, 8, 12, 4), |
497 |
| - children: <Widget>[ |
498 |
| - ListTile(tileColor: childColor), |
499 |
| - ], |
500 |
| - ), |
501 |
| - ), |
502 |
| - ), |
503 |
| - ), |
504 |
| - ); |
505 |
| - |
506 |
| - final Finder rootMaterialFinder = find.ancestor( |
507 |
| - of: find.byType(ExpansionTile), |
508 |
| - matching: find.byType(Material), |
509 |
| - ); |
510 |
| - |
511 |
| - final Finder expansionTileMaterialFinder = find.descendant( |
512 |
| - of: find.byType(ExpansionTile), |
513 |
| - matching: find.byType(Material), |
514 |
| - ); |
515 |
| - |
516 |
| - // ExpansionTile should not add a Material widget when it is not expanded |
517 |
| - expect(expansionTileMaterialFinder, findsNothing); |
518 |
| - |
519 |
| - // Expand |
520 |
| - await tester.tap(find.text('title')); |
521 |
| - await tester.pumpAndSettle(); |
522 |
| - |
523 |
| - // ExpansionTile adds a Material widget when it is expanded |
524 |
| - expect(expansionTileMaterialFinder, findsOneWidget); |
525 |
| - |
526 |
| - // Child color is painted on the inner Material widget |
527 |
| - expect(rootMaterialFinder, isNot(paints..path()..path(color: childColor))); |
528 |
| - expect(expansionTileMaterialFinder, paints..path(color: childColor)); |
529 |
| - }); |
530 |
| - |
531 | 484 | testWidgets('ExpansionTile.collapsedBackgroundColor', (WidgetTester tester) async {
|
532 | 485 | const Key expansionTileKey = Key('expansionTileKey');
|
533 | 486 | const Color backgroundColor = Colors.red;
|
|
0 commit comments