@@ -525,7 +525,7 @@ void main() {
525525 await tester.pumpWidget (
526526 SimulatedLayout .smallLandscapeMediumPortrait.slot (tester));
527527 await tester.pumpAndSettle ();
528- expect (find.byKey (const Key ('Breakpoints.smallMobile' )), findsOneWidget );
528+ expect (find.byKey (const Key ('Breakpoints.smallMobile' )), findsNothing );
529529 expect (find.byKey (const Key ('Breakpoints.mediumMobile' )), findsNothing);
530530 });
531531
@@ -545,7 +545,7 @@ void main() {
545545 await tester.pumpWidget (
546546 SimulatedLayout .smallLandscapeMediumLargePortrait.slot (tester));
547547 await tester.pumpAndSettle ();
548- expect (find.byKey (const Key ('Breakpoints.smallMobile' )), findsOneWidget );
548+ expect (find.byKey (const Key ('Breakpoints.smallMobile' )), findsNothing );
549549 expect (find.byKey (const Key ('Breakpoints.largeMobile' )), findsNothing);
550550 });
551551 });
@@ -627,6 +627,53 @@ void main() {
627627 expect (find.byKey (const Key ('Breakpoints.small' )), findsNothing);
628628 });
629629 });
630+
631+ group ('Slot And Up Layout Tests with Portrait and Landscape Mixed Layout' ,
632+ () {
633+ testWidgets (
634+ 'slotAndUp shows correct slot for smallPortraitMediumLandscape layout' ,
635+ (WidgetTester tester) async {
636+ // smallPortraitMediumLandscape layout should only show the small slot.
637+ await tester.pumpWidget (
638+ SimulatedLayout .smallPortraitMediumLandscape.slotAndUp (tester));
639+ await tester.pumpAndSettle ();
640+ expect (find.byKey (const Key ('Breakpoints.small' )), findsOneWidget);
641+ expect (find.byKey (const Key ('Breakpoints.mediumAndUp' )), findsNothing);
642+ });
643+
644+ testWidgets (
645+ 'slotAndUp shows correct slot for smallLandscapeMediumPortrait layout' ,
646+ (WidgetTester tester) async {
647+ // smallLandscapeMediumPortrait layout should show the small slot.
648+ await tester.pumpWidget (
649+ SimulatedLayout .smallLandscapeMediumPortrait.slotAndUp (tester));
650+ await tester.pumpAndSettle ();
651+ expect (find.byKey (const Key ('Breakpoints.small' )), findsNothing);
652+ expect (find.byKey (const Key ('Breakpoints.mediumAndUp' )), findsOneWidget);
653+ });
654+
655+ testWidgets (
656+ 'slotAndUp shows correct slot for smallPortraitMediumLargeLandscape layout' ,
657+ (WidgetTester tester) async {
658+ // smallPortraitMediumLargeLandscape layout should show the small slot.
659+ await tester.pumpWidget (
660+ SimulatedLayout .smallPortraitMediumLargeLandscape.slotAndUp (tester));
661+ await tester.pumpAndSettle ();
662+ expect (find.byKey (const Key ('Breakpoints.small' )), findsOneWidget);
663+ expect (find.byKey (const Key ('Breakpoints.mediumAndUp' )), findsNothing);
664+ });
665+
666+ testWidgets (
667+ 'slotAndUp shows correct slot for smallLandscapeMediumLargePortrait layout' ,
668+ (WidgetTester tester) async {
669+ // smallLandscapeMediumLargePortrait layout should show the small slot.
670+ await tester.pumpWidget (
671+ SimulatedLayout .smallLandscapeMediumLargePortrait.slotAndUp (tester));
672+ await tester.pumpAndSettle ();
673+ expect (find.byKey (const Key ('Breakpoints.small' )), findsNothing);
674+ expect (find.byKey (const Key ('Breakpoints.mediumAndUp' )), findsOneWidget);
675+ });
676+ });
630677}
631678
632679class DummyWidget extends StatelessWidget {
0 commit comments