Skip to content

Commit

Permalink
Mark leak: instances of OpacityLayer, created by _RenderChip, should …
Browse files Browse the repository at this point in the history
…be disposed. (#134395)
  • Loading branch information
polina-c authored Sep 11, 2023
1 parent 219efce commit 0844726
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/flutter/test/material/chip_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ Finder findTooltipContainer(String tooltipText) {
}

void main() {
testWidgets('M2 Chip defaults', (WidgetTester tester) async {
testWidgetsWithLeakTracking('M2 Chip defaults', (WidgetTester tester) async {
late TextTheme textTheme;

Widget buildFrame(Brightness brightness) {
Expand Down Expand Up @@ -292,7 +292,12 @@ void main() {
expect(labelStyle.overflow, textTheme.bodyLarge?.overflow);
expect(labelStyle.textBaseline, textTheme.bodyLarge?.textBaseline);
expect(labelStyle.wordSpacing, textTheme.bodyLarge?.wordSpacing);
});
},
// TODO(polina-c): remove after fixing
// https://github.com/flutter/flutter/issues/134394
leakTrackingTestConfig: const LeakTrackingTestConfig(
notDisposedAllowList: <String, int?>{'OpacityLayer': 2},
));

testWidgetsWithLeakTracking('M3 Chip defaults', (WidgetTester tester) async {
late TextTheme textTheme;
Expand Down

0 comments on commit 0844726

Please sign in to comment.