@@ -517,6 +517,23 @@ void main() {
517
517
await tester.pumpAndSettle ();
518
518
expect (find.byKey (const Key ('Breakpoints.smallMobile' )), findsOneWidget);
519
519
expect (find.byKey (const Key ('Breakpoints.mediumMobile' )), findsNothing);
520
+ expect (find.byKey (const Key ('Breakpoints.small' )), findsNothing);
521
+ expect (find.byKey (const Key ('Breakpoints.smallDesktop' )), findsNothing);
522
+ expect (find.byKey (const Key ('Breakpoints.medium' )), findsNothing);
523
+ expect (find.byKey (const Key ('Breakpoints.mediumDesktop' )), findsNothing);
524
+ expect (find.byKey (const Key ('Breakpoints.mediumLarge' )), findsNothing);
525
+ expect (
526
+ find.byKey (const Key ('Breakpoints.mediumLargeMobile' )), findsNothing);
527
+ expect (find.byKey (const Key ('Breakpoints.mediumLargeDesktop' )),
528
+ findsNothing);
529
+ expect (find.byKey (const Key ('Breakpoints.large' )), findsNothing);
530
+ expect (find.byKey (const Key ('Breakpoints.largeMobile' )), findsNothing);
531
+ expect (find.byKey (const Key ('Breakpoints.largeDesktop' )), findsNothing);
532
+ expect (find.byKey (const Key ('Breakpoints.extraLarge' )), findsNothing);
533
+ expect (
534
+ find.byKey (const Key ('Breakpoints.extraLargeMobile' )), findsNothing);
535
+ expect (
536
+ find.byKey (const Key ('Breakpoints.extraLargeDesktop' )), findsNothing);
520
537
});
521
538
522
539
testWidgets (
@@ -526,7 +543,24 @@ void main() {
526
543
SimulatedLayout .smallLandscapeMediumPortrait.slot (tester));
527
544
await tester.pumpAndSettle ();
528
545
expect (find.byKey (const Key ('Breakpoints.smallMobile' )), findsNothing);
529
- expect (find.byKey (const Key ('Breakpoints.mediumMobile' )), findsNothing);
546
+ expect (find.byKey (const Key ('Breakpoints.mediumMobile' )), findsOneWidget);
547
+ expect (find.byKey (const Key ('Breakpoints.small' )), findsNothing);
548
+ expect (find.byKey (const Key ('Breakpoints.smallDesktop' )), findsNothing);
549
+ expect (find.byKey (const Key ('Breakpoints.medium' )), findsNothing);
550
+ expect (find.byKey (const Key ('Breakpoints.mediumDesktop' )), findsNothing);
551
+ expect (find.byKey (const Key ('Breakpoints.mediumLarge' )), findsNothing);
552
+ expect (
553
+ find.byKey (const Key ('Breakpoints.mediumLargeMobile' )), findsNothing);
554
+ expect (find.byKey (const Key ('Breakpoints.mediumLargeDesktop' )),
555
+ findsNothing);
556
+ expect (find.byKey (const Key ('Breakpoints.large' )), findsNothing);
557
+ expect (find.byKey (const Key ('Breakpoints.largeMobile' )), findsNothing);
558
+ expect (find.byKey (const Key ('Breakpoints.largeDesktop' )), findsNothing);
559
+ expect (find.byKey (const Key ('Breakpoints.extraLarge' )), findsNothing);
560
+ expect (
561
+ find.byKey (const Key ('Breakpoints.extraLargeMobile' )), findsNothing);
562
+ expect (
563
+ find.byKey (const Key ('Breakpoints.extraLargeDesktop' )), findsNothing);
530
564
});
531
565
532
566
testWidgets (
@@ -537,6 +571,22 @@ void main() {
537
571
await tester.pumpAndSettle ();
538
572
expect (find.byKey (const Key ('Breakpoints.smallMobile' )), findsOneWidget);
539
573
expect (find.byKey (const Key ('Breakpoints.largeMobile' )), findsNothing);
574
+ expect (find.byKey (const Key ('Breakpoints.small' )), findsNothing);
575
+ expect (find.byKey (const Key ('Breakpoints.smallDesktop' )), findsNothing);
576
+ expect (find.byKey (const Key ('Breakpoints.medium' )), findsNothing);
577
+ expect (find.byKey (const Key ('Breakpoints.mediumDesktop' )), findsNothing);
578
+ expect (find.byKey (const Key ('Breakpoints.mediumLarge' )), findsNothing);
579
+ expect (
580
+ find.byKey (const Key ('Breakpoints.mediumLargeMobile' )), findsNothing);
581
+ expect (find.byKey (const Key ('Breakpoints.mediumLargeDesktop' )),
582
+ findsNothing);
583
+ expect (find.byKey (const Key ('Breakpoints.large' )), findsNothing);
584
+ expect (find.byKey (const Key ('Breakpoints.largeDesktop' )), findsNothing);
585
+ expect (find.byKey (const Key ('Breakpoints.extraLarge' )), findsNothing);
586
+ expect (
587
+ find.byKey (const Key ('Breakpoints.extraLargeMobile' )), findsNothing);
588
+ expect (
589
+ find.byKey (const Key ('Breakpoints.extraLargeDesktop' )), findsNothing);
540
590
});
541
591
542
592
testWidgets (
@@ -547,6 +597,48 @@ void main() {
547
597
await tester.pumpAndSettle ();
548
598
expect (find.byKey (const Key ('Breakpoints.smallMobile' )), findsNothing);
549
599
expect (find.byKey (const Key ('Breakpoints.largeMobile' )), findsNothing);
600
+ expect (find.byKey (const Key ('Breakpoints.small' )), findsNothing);
601
+ expect (find.byKey (const Key ('Breakpoints.smallDesktop' )), findsNothing);
602
+ expect (find.byKey (const Key ('Breakpoints.medium' )), findsNothing);
603
+ expect (find.byKey (const Key ('Breakpoints.mediumDesktop' )), findsNothing);
604
+ expect (find.byKey (const Key ('Breakpoints.mediumLarge' )), findsNothing);
605
+ expect (find.byKey (const Key ('Breakpoints.mediumLargeMobile' )),
606
+ findsOneWidget);
607
+ expect (find.byKey (const Key ('Breakpoints.mediumLargeDesktop' )),
608
+ findsNothing);
609
+ expect (find.byKey (const Key ('Breakpoints.large' )), findsNothing);
610
+ expect (find.byKey (const Key ('Breakpoints.largeDesktop' )), findsNothing);
611
+ expect (find.byKey (const Key ('Breakpoints.extraLarge' )), findsNothing);
612
+ expect (
613
+ find.byKey (const Key ('Breakpoints.extraLargeMobile' )), findsNothing);
614
+ expect (
615
+ find.byKey (const Key ('Breakpoints.extraLargeDesktop' )), findsNothing);
616
+ });
617
+
618
+ testWidgets (
619
+ 'Layout for mediumLargeLandscapeMediumPortrait shows correct slot configuration' ,
620
+ (WidgetTester tester) async {
621
+ await tester.pumpWidget (
622
+ SimulatedLayout .mediumLargeLandscapeMediumPortrait.slot (tester));
623
+ await tester.pumpAndSettle ();
624
+ expect (find.byKey (const Key ('Breakpoints.smallMobile' )), findsNothing);
625
+ expect (find.byKey (const Key ('Breakpoints.largeMobile' )), findsNothing);
626
+ expect (find.byKey (const Key ('Breakpoints.small' )), findsNothing);
627
+ expect (find.byKey (const Key ('Breakpoints.smallDesktop' )), findsNothing);
628
+ expect (find.byKey (const Key ('Breakpoints.medium' )), findsNothing);
629
+ expect (find.byKey (const Key ('Breakpoints.mediumDesktop' )), findsNothing);
630
+ expect (find.byKey (const Key ('Breakpoints.mediumLarge' )), findsNothing);
631
+ expect (find.byKey (const Key ('Breakpoints.mediumLargeMobile' )),
632
+ findsOneWidget);
633
+ expect (find.byKey (const Key ('Breakpoints.mediumLargeDesktop' )),
634
+ findsNothing);
635
+ expect (find.byKey (const Key ('Breakpoints.large' )), findsNothing);
636
+ expect (find.byKey (const Key ('Breakpoints.largeDesktop' )), findsNothing);
637
+ expect (find.byKey (const Key ('Breakpoints.extraLarge' )), findsNothing);
638
+ expect (
639
+ find.byKey (const Key ('Breakpoints.extraLargeMobile' )), findsNothing);
640
+ expect (
641
+ find.byKey (const Key ('Breakpoints.extraLargeDesktop' )), findsNothing);
550
642
});
551
643
});
552
644
@@ -673,6 +765,17 @@ void main() {
673
765
expect (find.byKey (const Key ('Breakpoints.small' )), findsNothing);
674
766
expect (find.byKey (const Key ('Breakpoints.mediumAndUp' )), findsOneWidget);
675
767
});
768
+
769
+ testWidgets (
770
+ 'slotAndUp shows correct slot for mediumLargeLandscapeMediumPortrait layout' ,
771
+ (WidgetTester tester) async {
772
+ // mediumLargeLandscapeMediumPortrait layout should show the mediumAndUp slot.
773
+ await tester.pumpWidget (
774
+ SimulatedLayout .mediumLargeLandscapeMediumPortrait.slotAndUp (tester));
775
+ await tester.pumpAndSettle ();
776
+ expect (find.byKey (const Key ('Breakpoints.small' )), findsNothing);
777
+ expect (find.byKey (const Key ('Breakpoints.mediumAndUp' )), findsOneWidget);
778
+ });
676
779
});
677
780
678
781
// Test for `spacing`.
0 commit comments