mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
19 lines
663 B
Dart
19 lines
663 B
Dart
// Copyright 2015 The Chromium Authors. All rights reserved.
|
|
// 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:sky_services/semantics/semantics.mojom.dart' as mojom;
|
|
|
|
class TestSemanticsListener implements mojom.SemanticsListener {
|
|
TestSemanticsListener() {
|
|
SemanticsNode.addListener(this);
|
|
}
|
|
final List<mojom.SemanticsNode> updates = <mojom.SemanticsNode>[];
|
|
updateSemanticsTree(List<mojom.SemanticsNode> nodes) {
|
|
assert(!nodes.any((mojom.SemanticsNode node) => node == null));
|
|
updates.addAll(nodes);
|
|
updates.add(null);
|
|
}
|
|
}
|