scrollable_semantics_traversal_order_test.dart 28.5 KB
Newer Older
Ian Hickson's avatar
Ian Hickson committed
1
// Copyright 2014 The Flutter Authors. All rights reserved.
2 3 4 5 6
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
7
import 'package:flutter_test/flutter_test.dart';
8 9 10 11 12

import 'semantics_tester.dart';

void main() {
  testWidgets('Traversal Order of SliverList', (WidgetTester tester) async {
13
    final SemanticsTester semantics = SemanticsTester(tester);
14

15
    final List<Widget> listChildren = List<Widget>.generate(30, (int i) {
16
      return SizedBox(
17
        height: 200.0,
18
        child: Row(
19 20
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: <Widget>[
21
            Semantics(
22
              container: true,
23
              child: Text('Item ${i}a'),
24
            ),
25
            Semantics(
26
              container: true,
27
              child: Text('item ${i}b'),
28 29 30 31 32 33
            ),
          ],
        ),
      );
    });
    await tester.pumpWidget(
34
      Semantics(
35
        textDirection: TextDirection.ltr,
36
        child: Directionality(
37
          textDirection: TextDirection.ltr,
38
          child: MediaQuery(
39
            data: const MediaQueryData(),
40 41
            child: CustomScrollView(
              controller: ScrollController(initialScrollOffset: 3000.0),
42
              semanticChildCount: 30,
43
              slivers: <Widget>[
44 45
                SliverList(
                  delegate: SliverChildListDelegate(listChildren),
46 47 48 49 50 51 52 53 54
                ),
              ],
            ),
          ),
        ),
      ),
    );

    expect(semantics, hasSemantics(
55
      TestSemantics.root(
56
        children: <TestSemantics>[
57
          TestSemantics(
58 59
            textDirection: TextDirection.ltr,
            children: <TestSemantics>[
60
              TestSemantics(
61
                children: <TestSemantics>[
62
                  TestSemantics(
63 64
                    scrollIndex: 15,
                    scrollChildren: 30,
65 66 67
                    flags: <SemanticsFlag>[
                      SemanticsFlag.hasImplicitScrolling,
                    ],
68 69 70 71 72
                    actions: <SemanticsAction>[
                      SemanticsAction.scrollUp,
                      SemanticsAction.scrollDown,
                    ],
                    children: <TestSemantics>[
73
                      TestSemantics(
74
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
75 76 77 78 79 80 81 82 83 84 85 86
                        children: <TestSemantics>[
                          TestSemantics(
                            flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                            label: 'Item 13a',
                            textDirection: TextDirection.ltr,
                          ),
                          TestSemantics(
                            flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                            label: 'item 13b',
                            textDirection: TextDirection.ltr,
                          ),
                        ],
87
                      ),
88
                      TestSemantics(
89
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
90 91 92 93 94 95 96 97 98 99 100
                        children: <TestSemantics>[
                          TestSemantics(
                            flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                            label: 'Item 14a',
                            textDirection: TextDirection.ltr,
                          ),
                          TestSemantics(
                            flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                            label: 'item 14b',
                            textDirection: TextDirection.ltr,
                          ),
101
                        ],
102
                      ),
103
                      TestSemantics(
104 105 106 107 108 109 110 111 112 113
                        children: <TestSemantics>[
                          TestSemantics(
                            label: 'Item 15a',
                            textDirection: TextDirection.ltr,
                          ),
                          TestSemantics(
                            label: 'item 15b',
                            textDirection: TextDirection.ltr,
                          ),
                        ],
114
                      ),
115
                      TestSemantics(
116 117 118 119 120 121 122 123 124 125
                        children: <TestSemantics>[
                          TestSemantics(
                            label: 'Item 16a',
                            textDirection: TextDirection.ltr,
                          ),
                          TestSemantics(
                            label: 'item 16b',
                            textDirection: TextDirection.ltr,
                          ),
                        ],
126
                      ),
127
                      TestSemantics(
128 129 130 131 132 133 134 135 136 137
                        children: <TestSemantics>[
                          TestSemantics(
                            label: 'Item 17a',
                            textDirection: TextDirection.ltr,
                          ),
                          TestSemantics(
                            label: 'item 17b',
                            textDirection: TextDirection.ltr,
                          ),
                        ],
138
                      ),
139
                      TestSemantics(
140
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
141 142 143 144 145 146 147 148 149 150 151 152
                        children: <TestSemantics>[
                          TestSemantics(
                            flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                            label: 'Item 18a',
                            textDirection: TextDirection.ltr,
                          ),
                          TestSemantics(
                            flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                            label: 'item 18b',
                            textDirection: TextDirection.ltr,
                          ),
                        ],
153
                      ),
154
                      TestSemantics(
155
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
156 157 158 159 160 161 162 163 164 165 166 167
                        children: <TestSemantics>[
                          TestSemantics(
                            flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                            label: 'Item 19a',
                            textDirection: TextDirection.ltr,
                          ),
                          TestSemantics(
                            flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                            label: 'item 19b',
                            textDirection: TextDirection.ltr,
                          ),
                        ],
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
                      ),
                    ],
                  ),
                ],
              ),
            ],
          ),
        ],
      ),
      ignoreId: true,
      ignoreTransform: true,
      ignoreRect: true,
    ));

    semantics.dispose();
  });

  testWidgets('Traversal Order of SliverFixedExtentList', (WidgetTester tester) async {
186
    final SemanticsTester semantics = SemanticsTester(tester);
187

188
    final List<Widget> listChildren = List<Widget>.generate(30, (int i) {
189
      return SizedBox(
190
        height: 200.0,
191
        child: Row(
192 193
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: <Widget>[
194
            Semantics(
195
              container: true,
196
              child: Text('Item ${i}a'),
197
            ),
198
            Semantics(
199
              container: true,
200
              child: Text('item ${i}b'),
201 202 203 204 205 206
            ),
          ],
        ),
      );
    });
    await tester.pumpWidget(
207
      Semantics(
208
        textDirection: TextDirection.ltr,
209
        child: Directionality(
210
          textDirection: TextDirection.ltr,
211
          child: MediaQuery(
212
            data: const MediaQueryData(),
213 214
            child: CustomScrollView(
              controller: ScrollController(initialScrollOffset: 3000.0),
215
              slivers: <Widget>[
216
                SliverFixedExtentList(
217
                  itemExtent: 200.0,
218
                  delegate: SliverChildListDelegate(listChildren, addSemanticIndexes: false),
219 220 221 222 223 224 225 226 227
                ),
              ],
            ),
          ),
        ),
      ),
    );

    expect(semantics, hasSemantics(
228
      TestSemantics.root(
229
        children: <TestSemantics>[
230
          TestSemantics(
231 232
            textDirection: TextDirection.ltr,
            children: <TestSemantics>[
233
              TestSemantics(
234
                children: <TestSemantics>[
235
                  TestSemantics(
236 237 238
                    flags: <SemanticsFlag>[
                      SemanticsFlag.hasImplicitScrolling,
                    ],
239 240 241 242 243
                    actions: <SemanticsAction>[
                      SemanticsAction.scrollUp,
                      SemanticsAction.scrollDown,
                    ],
                    children: <TestSemantics>[
244
                      TestSemantics(
245 246 247 248
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'Item 13a',
                        textDirection: TextDirection.ltr,
                      ),
249
                      TestSemantics(
250 251 252 253
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'item 13b',
                        textDirection: TextDirection.ltr,
                      ),
254
                      TestSemantics(
255 256 257 258
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'Item 14a',
                        textDirection: TextDirection.ltr,
                      ),
259
                      TestSemantics(
260 261 262 263
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'item 14b',
                        textDirection: TextDirection.ltr,
                      ),
264
                      TestSemantics(
265 266 267
                        label: 'Item 15a',
                        textDirection: TextDirection.ltr,
                      ),
268
                      TestSemantics(
269 270 271
                        label: 'item 15b',
                        textDirection: TextDirection.ltr,
                      ),
272
                      TestSemantics(
273 274 275
                        label: 'Item 16a',
                        textDirection: TextDirection.ltr,
                      ),
276
                      TestSemantics(
277 278 279
                        label: 'item 16b',
                        textDirection: TextDirection.ltr,
                      ),
280
                      TestSemantics(
281 282 283
                        label: 'Item 17a',
                        textDirection: TextDirection.ltr,
                      ),
284
                      TestSemantics(
285 286 287
                        label: 'item 17b',
                        textDirection: TextDirection.ltr,
                      ),
288
                      TestSemantics(
289 290 291 292
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'Item 18a',
                        textDirection: TextDirection.ltr,
                      ),
293
                      TestSemantics(
294 295 296 297
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'item 18b',
                        textDirection: TextDirection.ltr,
                      ),
298
                      TestSemantics(
299 300 301 302
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'Item 19a',
                        textDirection: TextDirection.ltr,
                      ),
303
                      TestSemantics(
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'item 19b',
                        textDirection: TextDirection.ltr,
                      ),
                    ],
                  ),
                ],
              ),
            ],
          ),
        ],
      ),
      ignoreId: true,
      ignoreTransform: true,
      ignoreRect: true,
    ));

    semantics.dispose();
  });

  testWidgets('Traversal Order of SliverGrid', (WidgetTester tester) async {
325
    final SemanticsTester semantics = SemanticsTester(tester);
326

327
    final List<Widget> listChildren = List<Widget>.generate(30, (int i) {
328
      return SizedBox(
329
        height: 200.0,
330
        child: Text('Item $i'),
331 332 333
      );
    });
    await tester.pumpWidget(
334
      Semantics(
335
        textDirection: TextDirection.ltr,
336
        child: Directionality(
337
          textDirection: TextDirection.ltr,
338
          child: MediaQuery(
339
            data: const MediaQueryData(),
340 341
            child: CustomScrollView(
              controller: ScrollController(initialScrollOffset: 1600.0),
342
              slivers: <Widget>[
343
                SliverGrid.count(
344 345 346 347 348 349 350 351 352 353 354 355
                  crossAxisCount: 2,
                  crossAxisSpacing: 400.0,
                  children: listChildren,
                ),
              ],
            ),
          ),
        ),
      ),
    );

    expect(semantics, hasSemantics(
356
      TestSemantics.root(
357
        children: <TestSemantics>[
358
          TestSemantics(
359 360
            textDirection: TextDirection.ltr,
            children: <TestSemantics>[
361
              TestSemantics(
362
                children: <TestSemantics>[
363
                  TestSemantics(
364 365 366 367 368 369 370
                    flags: <SemanticsFlag>[
                      SemanticsFlag.hasImplicitScrolling,
                    ],
                    actions: <SemanticsAction>[
                      SemanticsAction.scrollUp,
                      SemanticsAction.scrollDown,
                    ],
371
                    children: <TestSemantics>[
372
                      TestSemantics(
373 374 375 376
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'Item 12',
                        textDirection: TextDirection.ltr,
                      ),
377
                      TestSemantics(
378 379 380 381
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'Item 13',
                        textDirection: TextDirection.ltr,
                      ),
382
                      TestSemantics(
383 384 385 386
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'Item 14',
                        textDirection: TextDirection.ltr,
                      ),
387
                      TestSemantics(
388 389 390 391
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'Item 15',
                        textDirection: TextDirection.ltr,
                      ),
392
                      TestSemantics(
393 394 395
                        label: 'Item 16',
                        textDirection: TextDirection.ltr,
                      ),
396
                      TestSemantics(
397 398 399
                        label: 'Item 17',
                        textDirection: TextDirection.ltr,
                      ),
400
                      TestSemantics(
401 402 403
                        label: 'Item 18',
                        textDirection: TextDirection.ltr,
                      ),
404
                      TestSemantics(
405 406 407
                        label: 'Item 19',
                        textDirection: TextDirection.ltr,
                      ),
408
                      TestSemantics(
409 410 411
                        label: 'Item 20',
                        textDirection: TextDirection.ltr,
                      ),
412
                      TestSemantics(
413 414 415
                        label: 'Item 21',
                        textDirection: TextDirection.ltr,
                      ),
416
                      TestSemantics(
417 418 419 420
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'Item 22',
                        textDirection: TextDirection.ltr,
                      ),
421
                      TestSemantics(
422 423 424 425
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'Item 23',
                        textDirection: TextDirection.ltr,
                      ),
426
                      TestSemantics(
427 428 429 430
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'Item 24',
                        textDirection: TextDirection.ltr,
                      ),
431
                      TestSemantics(
432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'Item 25',
                        textDirection: TextDirection.ltr,
                      ),
                    ],
                  ),
                ],
              ),
            ],
          ),
        ],
      ),
      ignoreId: true,
      ignoreTransform: true,
      ignoreRect: true,
    ));

    semantics.dispose();
  });

  testWidgets('Traversal Order of List of individual slivers', (WidgetTester tester) async {
453
    final SemanticsTester semantics = SemanticsTester(tester);
454

455 456
    final List<Widget> listChildren = List<Widget>.generate(30, (int i) {
      return SliverToBoxAdapter(
457
        child: SizedBox(
458
          height: 200.0,
459
          child: Row(
460 461
            crossAxisAlignment: CrossAxisAlignment.stretch,
            children: <Widget>[
462
              Semantics(
463
                container: true,
464
                child: Text('Item ${i}a'),
465
              ),
466
              Semantics(
467
                container: true,
468
                child: Text('item ${i}b'),
469 470 471 472 473 474 475
              ),
            ],
          ),
        ),
      );
    });
    await tester.pumpWidget(
476
      Semantics(
477
        textDirection: TextDirection.ltr,
478
        child: Directionality(
479
          textDirection: TextDirection.ltr,
480
          child: MediaQuery(
481
            data: const MediaQueryData(),
482 483
            child: CustomScrollView(
              controller: ScrollController(initialScrollOffset: 3000.0),
484 485 486 487 488 489 490 491
              slivers: listChildren,
            ),
          ),
        ),
      ),
    );

    expect(semantics, hasSemantics(
492
      TestSemantics.root(
493
        children: <TestSemantics>[
494
          TestSemantics(
495 496
            textDirection: TextDirection.ltr,
            children: <TestSemantics>[
497
              TestSemantics(
498
                children: <TestSemantics>[
499
                  TestSemantics(
500 501 502
                    flags: <SemanticsFlag>[
                      SemanticsFlag.hasImplicitScrolling,
                    ],
503 504 505 506 507
                    actions: <SemanticsAction>[
                      SemanticsAction.scrollUp,
                      SemanticsAction.scrollDown,
                    ],
                    children: <TestSemantics>[
508
                      TestSemantics(
509 510 511 512
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'Item 13a',
                        textDirection: TextDirection.ltr,
                      ),
513
                      TestSemantics(
514 515 516 517
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'item 13b',
                        textDirection: TextDirection.ltr,
                      ),
518
                      TestSemantics(
519 520 521 522
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'Item 14a',
                        textDirection: TextDirection.ltr,
                      ),
523
                      TestSemantics(
524 525 526 527
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'item 14b',
                        textDirection: TextDirection.ltr,
                      ),
528
                      TestSemantics(
529 530 531
                        label: 'Item 15a',
                        textDirection: TextDirection.ltr,
                      ),
532
                      TestSemantics(
533 534 535
                        label: 'item 15b',
                        textDirection: TextDirection.ltr,
                      ),
536
                      TestSemantics(
537 538 539
                        label: 'Item 16a',
                        textDirection: TextDirection.ltr,
                      ),
540
                      TestSemantics(
541 542 543
                        label: 'item 16b',
                        textDirection: TextDirection.ltr,
                      ),
544
                      TestSemantics(
545 546 547
                        label: 'Item 17a',
                        textDirection: TextDirection.ltr,
                      ),
548
                      TestSemantics(
549 550 551
                        label: 'item 17b',
                        textDirection: TextDirection.ltr,
                      ),
552
                      TestSemantics(
553 554 555 556
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'Item 18a',
                        textDirection: TextDirection.ltr,
                      ),
557
                      TestSemantics(
558 559 560 561
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'item 18b',
                        textDirection: TextDirection.ltr,
                      ),
562
                      TestSemantics(
563 564 565 566
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'Item 19a',
                        textDirection: TextDirection.ltr,
                      ),
567
                      TestSemantics(
568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: 'item 19b',
                        textDirection: TextDirection.ltr,
                      ),
                    ],
                  ),
                ],
              ),
            ],
          ),
        ],
      ),
      ignoreId: true,
      ignoreTransform: true,
      ignoreRect: true,
    ));

    semantics.dispose();
  });

  testWidgets('Traversal Order of in a SingleChildScrollView', (WidgetTester tester) async {
589
    final SemanticsTester semantics = SemanticsTester(tester);
590

591
    final List<Widget> listChildren = List<Widget>.generate(30, (int i) {
592
      return SizedBox(
593
        height: 200.0,
594
        child: Row(
595 596
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: <Widget>[
597
            Semantics(
598
              container: true,
599
              child: Text('Item ${i}a'),
600
            ),
601
            Semantics(
602
              container: true,
603
              child: Text('item ${i}b'),
604 605 606 607 608 609
            ),
          ],
        ),
      );
    });
    await tester.pumpWidget(
610
      Semantics(
611
        textDirection: TextDirection.ltr,
612
        child: Directionality(
613
          textDirection: TextDirection.ltr,
614
          child: MediaQuery(
615
            data: const MediaQueryData(),
616 617 618
            child: SingleChildScrollView(
              controller: ScrollController(initialScrollOffset: 3000.0),
              child: Column(
619 620 621 622 623 624 625 626
                children: listChildren,
              ),
            ),
          ),
        ),
      ),
    );

627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645
    final List<TestSemantics> children = <TestSemantics>[];
    for (int index = 0; index < 30; index += 1) {
      final bool isHidden = index < 15 ||  index > 17;
      children.add(
        TestSemantics(
          flags: isHidden ? <SemanticsFlag>[SemanticsFlag.isHidden] : 0,
          label: 'Item ${index}a',
          textDirection: TextDirection.ltr,
        ),
      );
      children.add(
        TestSemantics(
          flags: isHidden ? <SemanticsFlag>[SemanticsFlag.isHidden] : 0,
          label: 'item ${index}b',
          textDirection: TextDirection.ltr,
        ),
      );
    }

646
    expect(semantics, hasSemantics(
647
      TestSemantics.root(
648
        children: <TestSemantics>[
649
          TestSemantics(
650 651
            textDirection: TextDirection.ltr,
            children: <TestSemantics>[
652
              TestSemantics(
653 654 655
                flags: <SemanticsFlag>[
                  SemanticsFlag.hasImplicitScrolling,
                ],
656 657 658 659
                actions: <SemanticsAction>[
                  SemanticsAction.scrollUp,
                  SemanticsAction.scrollDown,
                ],
660
                children: children,
661 662 663 664 665 666 667 668 669 670 671 672 673 674
              ),
            ],
          ),
        ],
      ),
      ignoreId: true,
      ignoreTransform: true,
      ignoreRect: true,
    ));

    semantics.dispose();
  });

  testWidgets('Traversal Order with center child', (WidgetTester tester) async {
675
    final SemanticsTester semantics = SemanticsTester(tester);
676

677
    await tester.pumpWidget(Semantics(
678
      textDirection: TextDirection.ltr,
679
      child: Directionality(
680
        textDirection: TextDirection.ltr,
681
        child: MediaQuery(
682
          data: const MediaQueryData(),
683
          child: Scrollable(
684
            viewportBuilder: (BuildContext context, ViewportOffset offset) {
685
              return Viewport(
686 687
                offset: offset,
                center: const ValueKey<int>(0),
688
                slivers: List<Widget>.generate(30, (int i) {
689
                  final int item = i - 15;
690 691
                  return SliverToBoxAdapter(
                    key: ValueKey<int>(item),
692
                    child: SizedBox(
693
                      height: 200.0,
694
                      child: Row(
695 696
                        crossAxisAlignment: CrossAxisAlignment.stretch,
                        children: <Widget>[
697
                          Semantics(
698
                            container: true,
699
                            child: Text('${item}a'),
700
                          ),
701
                          Semantics(
702
                            container: true,
703
                            child: Text('${item}b'),
704 705 706 707 708 709 710 711 712 713 714 715 716 717
                          ),
                        ],
                      ),
                    ),
                  );
                }),
              );
            },
          ),
        ),
      ),
    ));

    expect(semantics, hasSemantics(
718
      TestSemantics.root(
719
        children: <TestSemantics>[
720
          TestSemantics(
721 722
            textDirection: TextDirection.ltr,
            children: <TestSemantics>[
723
              TestSemantics(
724
                children: <TestSemantics>[
725
                  TestSemantics(
726 727 728
                    flags: <SemanticsFlag>[
                      SemanticsFlag.hasImplicitScrolling,
                    ],
729 730 731 732 733
                    actions: <SemanticsAction>[
                      SemanticsAction.scrollUp,
                      SemanticsAction.scrollDown,
                    ],
                    children: <TestSemantics>[
734
                      TestSemantics(
735 736 737 738
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: '-2a',
                        textDirection: TextDirection.ltr,
                      ),
739
                      TestSemantics(
740 741 742 743
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: '-2b',
                        textDirection: TextDirection.ltr,
                      ),
744
                      TestSemantics(
745 746 747 748
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: '-1a',
                        textDirection: TextDirection.ltr,
                      ),
749
                      TestSemantics(
750 751 752 753
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: '-1b',
                        textDirection: TextDirection.ltr,
                      ),
754
                      TestSemantics(
755 756 757
                        label: '0a',
                        textDirection: TextDirection.ltr,
                      ),
758
                      TestSemantics(
759 760 761
                        label: '0b',
                        textDirection: TextDirection.ltr,
                      ),
762
                      TestSemantics(
763 764 765
                        label: '1a',
                        textDirection: TextDirection.ltr,
                      ),
766
                      TestSemantics(
767 768 769
                        label: '1b',
                        textDirection: TextDirection.ltr,
                      ),
770
                      TestSemantics(
771 772 773
                        label: '2a',
                        textDirection: TextDirection.ltr,
                      ),
774
                      TestSemantics(
775 776 777
                        label: '2b',
                        textDirection: TextDirection.ltr,
                      ),
778
                      TestSemantics(
779 780 781 782
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: '3a',
                        textDirection: TextDirection.ltr,
                      ),
783
                      TestSemantics(
784 785 786 787
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: '3b',
                        textDirection: TextDirection.ltr,
                      ),
788
                      TestSemantics(
789 790 791 792
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: '4a',
                        textDirection: TextDirection.ltr,
                      ),
793
                      TestSemantics(
794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814
                        flags: <SemanticsFlag>[SemanticsFlag.isHidden],
                        label: '4b',
                        textDirection: TextDirection.ltr,
                      ),
                    ],
                  ),
                ],
              ),
            ],
          ),
        ],
      ),
      ignoreRect: true,
      ignoreTransform: true,
      ignoreId: true,
    ));

    semantics.dispose();

  });
}