diff --git a/test/toast_test.dart b/test/toast_test.dart index e9d6625..5457ae0 100644 --- a/test/toast_test.dart +++ b/test/toast_test.dart @@ -56,14 +56,13 @@ void main() { await tester.pumpAndSettle(); final AnimatedPadding widget = tester.firstWidget(find.byType(AnimatedPadding)) as AnimatedPadding; - final MediaQuery mediaQueryWidget = tester.widget( - find.ancestor( - of: find.byType(AnimatedPadding), - matching: find.byType(MediaQuery), - ), + // ignore: deprecated_member_use + final mediaQueryData = MediaQueryData.fromWindow( + // ignore: deprecated_member_use + TestWidgetsFlutterBinding.instance.window, ); final windowInsets = EdgeInsets.only( - bottom: mediaQueryWidget.data.viewInsets.bottom, + bottom: mediaQueryData.viewInsets.bottom, ); expect( const EdgeInsets.only(top: verticalOffset) + windowInsets,