scrollable_semantics_traversal_order_test.dart 29 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

import 'semantics_tester.dart';

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

15 16 17
    final ScrollController controller = ScrollController(initialScrollOffset: 3000.0);
    addTearDown(controller.dispose);

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

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

    semantics.dispose();
  });

188
  testWidgets('Traversal Order of SliverFixedExtentList', (WidgetTester tester) async {
189
    final SemanticsTester semantics = SemanticsTester(tester);
190

191 192 193
    final ScrollController controller = ScrollController(initialScrollOffset: 3000.0);
    addTearDown(controller.dispose);

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

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

    semantics.dispose();
  });

330
  testWidgets('Traversal Order of SliverGrid', (WidgetTester tester) async {
331
    final SemanticsTester semantics = SemanticsTester(tester);
332

333 334 335
    final ScrollController controller = ScrollController(initialScrollOffset: 1600.0);
    addTearDown(controller.dispose);

336
    final List<Widget> listChildren = List<Widget>.generate(30, (int i) {
337
      return SizedBox(
338
        height: 200.0,
339
        child: Text('Item $i'),
340 341 342
      );
    });
    await tester.pumpWidget(
343
      Semantics(
344
        textDirection: TextDirection.ltr,
345
        child: Directionality(
346
          textDirection: TextDirection.ltr,
347
          child: MediaQuery(
348
            data: const MediaQueryData(),
349
            child: CustomScrollView(
350
              controller: controller,
351
              slivers: <Widget>[
352
                SliverGrid.count(
353 354 355 356 357 358 359 360 361 362 363 364
                  crossAxisCount: 2,
                  crossAxisSpacing: 400.0,
                  children: listChildren,
                ),
              ],
            ),
          ),
        ),
      ),
    );

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

    semantics.dispose();
  });

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

464 465 466
    final ScrollController controller = ScrollController(initialScrollOffset: 3000.0);
    addTearDown(controller.dispose);

467 468
    final List<Widget> listChildren = List<Widget>.generate(30, (int i) {
      return SliverToBoxAdapter(
469
        child: SizedBox(
470
          height: 200.0,
471
          child: Row(
472 473
            crossAxisAlignment: CrossAxisAlignment.stretch,
            children: <Widget>[
474
              Semantics(
475
                container: true,
476
                child: Text('Item ${i}a'),
477
              ),
478
              Semantics(
479
                container: true,
480
                child: Text('item ${i}b'),
481 482 483 484 485 486 487
              ),
            ],
          ),
        ),
      );
    });
    await tester.pumpWidget(
488
      Semantics(
489
        textDirection: TextDirection.ltr,
490
        child: Directionality(
491
          textDirection: TextDirection.ltr,
492
          child: MediaQuery(
493
            data: const MediaQueryData(),
494
            child: CustomScrollView(
495
              controller: controller,
496 497 498 499 500 501 502 503
              slivers: listChildren,
            ),
          ),
        ),
      ),
    );

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

    semantics.dispose();
  });

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

603 604 605
    final ScrollController controller = ScrollController(initialScrollOffset: 3000.0);
    addTearDown(controller.dispose);

606
    final List<Widget> listChildren = List<Widget>.generate(30, (int i) {
607
      return SizedBox(
608
        height: 200.0,
609
        child: Row(
610 611
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: <Widget>[
612
            Semantics(
613
              container: true,
614
              child: Text('Item ${i}a'),
615
            ),
616
            Semantics(
617
              container: true,
618
              child: Text('item ${i}b'),
619 620 621 622 623 624
            ),
          ],
        ),
      );
    });
    await tester.pumpWidget(
625
      Semantics(
626
        textDirection: TextDirection.ltr,
627
        child: Directionality(
628
          textDirection: TextDirection.ltr,
629
          child: MediaQuery(
630
            data: const MediaQueryData(),
631
            child: SingleChildScrollView(
632
              controller: controller,
633
              child: Column(
634 635 636 637 638 639 640 641
                children: listChildren,
              ),
            ),
          ),
        ),
      ),
    );

642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660
    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,
        ),
      );
    }

661
    expect(semantics, hasSemantics(
662
      TestSemantics.root(
663
        children: <TestSemantics>[
664
          TestSemantics(
665 666
            textDirection: TextDirection.ltr,
            children: <TestSemantics>[
667
              TestSemantics(
668 669 670
                flags: <SemanticsFlag>[
                  SemanticsFlag.hasImplicitScrolling,
                ],
671 672 673 674
                actions: <SemanticsAction>[
                  SemanticsAction.scrollUp,
                  SemanticsAction.scrollDown,
                ],
675
                children: children,
676 677 678 679 680 681 682 683 684 685 686 687 688
              ),
            ],
          ),
        ],
      ),
      ignoreId: true,
      ignoreTransform: true,
      ignoreRect: true,
    ));

    semantics.dispose();
  });

689
  testWidgets('Traversal Order with center child', (WidgetTester tester) async {
690
    final SemanticsTester semantics = SemanticsTester(tester);
691

692
    await tester.pumpWidget(Semantics(
693
      textDirection: TextDirection.ltr,
694
      child: Directionality(
695
        textDirection: TextDirection.ltr,
696
        child: MediaQuery(
697
          data: const MediaQueryData(),
698
          child: Scrollable(
699
            viewportBuilder: (BuildContext context, ViewportOffset offset) {
700
              return Viewport(
701 702
                offset: offset,
                center: const ValueKey<int>(0),
703
                slivers: List<Widget>.generate(30, (int i) {
704
                  final int item = i - 15;
705 706
                  return SliverToBoxAdapter(
                    key: ValueKey<int>(item),
707
                    child: SizedBox(
708
                      height: 200.0,
709
                      child: Row(
710 711
                        crossAxisAlignment: CrossAxisAlignment.stretch,
                        children: <Widget>[
712
                          Semantics(
713
                            container: true,
714
                            child: Text('${item}a'),
715
                          ),
716
                          Semantics(
717
                            container: true,
718
                            child: Text('${item}b'),
719 720 721 722 723 724 725 726 727 728 729 730 731 732
                          ),
                        ],
                      ),
                    ),
                  );
                }),
              );
            },
          ),
        ),
      ),
    ));

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

    semantics.dispose();

  });
}