From 0aedb5e6887f31e34572e8ab37c0b47fc4112822 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Tue, 2 Jul 2024 09:17:41 -0700 Subject: [PATCH] docimports for semantics (#151132) Part of https://github.com/flutter/flutter/issues/150800 Issues encountered: --- packages/flutter/lib/semantics.dart | 2 ++ packages/flutter/lib/src/semantics/binding.dart | 9 +++++++-- packages/flutter/lib/src/semantics/debug.dart | 2 ++ packages/flutter/lib/src/semantics/semantics.dart | 8 +++++++- packages/flutter/lib/src/semantics/semantics_event.dart | 3 +++ .../flutter/lib/src/semantics/semantics_service.dart | 3 +++ 6 files changed, 24 insertions(+), 3 deletions(-) diff --git a/packages/flutter/lib/semantics.dart b/packages/flutter/lib/semantics.dart index 06e7d41333..644d988b80 100644 --- a/packages/flutter/lib/semantics.dart +++ b/packages/flutter/lib/semantics.dart @@ -11,6 +11,8 @@ /// /// The [SemanticsNode] hierarchy represents the semantic structure of the UI /// and is used by the platform-specific accessibility services. +/// +/// @docImport 'src/semantics/semantics.dart'; library semantics; export 'dart:ui' show LocaleStringAttribute, SpellOutStringAttribute; diff --git a/packages/flutter/lib/src/semantics/binding.dart b/packages/flutter/lib/src/semantics/binding.dart index c12ec7b035..30e7ebf734 100644 --- a/packages/flutter/lib/src/semantics/binding.dart +++ b/packages/flutter/lib/src/semantics/binding.dart @@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +/// @docImport 'package:flutter/widgets.dart'; +/// +/// @docImport 'semantics.dart'; +library; + import 'dart:ui' as ui show AccessibilityFeatures, SemanticsActionEvent, SemanticsUpdateBuilder; import 'package:flutter/foundation.dart'; @@ -128,13 +133,13 @@ mixin SemanticsBinding on BindingBase { /// /// Bindings that mixin the [SemanticsBinding] must implement this method and /// perform the given `action` on the [SemanticsNode] specified by - /// [SemanticsActionEvent.nodeId]. + /// [ui.SemanticsActionEvent.nodeId]. /// /// See [dart:ui.PlatformDispatcher.onSemanticsActionEvent]. @protected void performSemanticsAction(ui.SemanticsActionEvent action); - /// The currently active set of [AccessibilityFeatures]. + /// The currently active set of [ui.AccessibilityFeatures]. /// /// This is set when the binding is first initialized and updated whenever a /// flag is changed. diff --git a/packages/flutter/lib/src/semantics/debug.dart b/packages/flutter/lib/src/semantics/debug.dart index dca4177f56..60c5099011 100644 --- a/packages/flutter/lib/src/semantics/debug.dart +++ b/packages/flutter/lib/src/semantics/debug.dart @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +/// @docImport 'binding.dart'; +library; /// Overrides the setting of [SemanticsBinding.disableAnimations] for debugging /// and testing. diff --git a/packages/flutter/lib/src/semantics/semantics.dart b/packages/flutter/lib/src/semantics/semantics.dart index b3c830aac6..e8f4969e6a 100644 --- a/packages/flutter/lib/src/semantics/semantics.dart +++ b/packages/flutter/lib/src/semantics/semantics.dart @@ -2,6 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +/// @docImport 'dart:ui'; +/// +/// @docImport 'package:flutter/material.dart'; +/// @docImport 'package:flutter/rendering.dart'; +library; + import 'dart:math' as math; import 'dart:ui' show Offset, Rect, SemanticsAction, SemanticsFlag, SemanticsUpdate, SemanticsUpdateBuilder, StringAttribute, TextDirection; @@ -3717,7 +3723,7 @@ class SemanticsConfiguration { /// /// See also: /// - /// * [addAction] to add an action. + /// * [_addAction] to add an action. final Map _actions = {}; int get _effectiveActionsAsBits => isBlockingUserActions ? _actionsAsBits & _kUnblockedUserActions : _actionsAsBits; diff --git a/packages/flutter/lib/src/semantics/semantics_event.dart b/packages/flutter/lib/src/semantics/semantics_event.dart index 88cfcf1f09..b3751ea6c3 100644 --- a/packages/flutter/lib/src/semantics/semantics_event.dart +++ b/packages/flutter/lib/src/semantics/semantics_event.dart @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +/// @docImport 'package:flutter/services.dart'; +/// @docImport 'package:flutter/widgets.dart'; +library; import 'package:flutter/foundation.dart'; import 'package:flutter/painting.dart'; diff --git a/packages/flutter/lib/src/semantics/semantics_service.dart b/packages/flutter/lib/src/semantics/semantics_service.dart index 9448853e68..2c0acc380b 100644 --- a/packages/flutter/lib/src/semantics/semantics_service.dart +++ b/packages/flutter/lib/src/semantics/semantics_service.dart @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +/// @docImport 'package:flutter/widgets.dart'; +library; + import 'dart:ui' show TextDirection; import 'package:flutter/services.dart' show SystemChannels;