diff --git a/packages/flutter_markdown/test/list_test.dart b/packages/flutter_markdown/test/list_test.dart index 4a587c50a9..9e2b1fcab4 100644 --- a/packages/flutter_markdown/test/list_test.dart +++ b/packages/flutter_markdown/test/list_test.dart @@ -202,7 +202,8 @@ void defineTests() { ), ); - final double screenWidth = tester.allElements.first.size!.width; + final double screenWidth = + find.byType(Column).evaluate().first.size!.width; final double markdownBodyWidth = find.byType(MarkdownBody).evaluate().single.size!.width; @@ -225,7 +226,8 @@ void defineTests() { ), ); - final double screenWidth = tester.allElements.first.size!.width; + final double screenWidth = + find.byType(Column).evaluate().first.size!.width; final double markdownBodyWidth = find.byType(MarkdownBody).evaluate().single.size!.width;