mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This rewrites imports of various mojom.dart files from the Flutter engine repo to instead import normal-looking dart files from the (new) flutter_services package. This package handles exporting the correct symbols from generated code wherever that may live. Includes an engine roll to 3551e7a48e2e336777b15c7637af92fd7605b6c5 which contains the new flutter_services package.
26 lines
744 B
Dart
26 lines
744 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:flutter_services/semantics.dart' as mojom;
|
|
|
|
class TestSemanticsClient {
|
|
TestSemanticsClient(PipelineOwner pipelineOwner) {
|
|
_semanticsOwner = pipelineOwner.addSemanticsListener(_updateSemanticsTree);
|
|
}
|
|
|
|
SemanticsOwner _semanticsOwner;
|
|
|
|
void dispose() {
|
|
_semanticsOwner.removeListener(_updateSemanticsTree);
|
|
_semanticsOwner = null;
|
|
}
|
|
|
|
final List<mojom.SemanticsNode> updates = <mojom.SemanticsNode>[];
|
|
|
|
void _updateSemanticsTree(List<mojom.SemanticsNode> nodes) {
|
|
updates.addAll(nodes);
|
|
}
|
|
}
|