From 7b5462cc34af903e2f2de4be7540ff858685cdfc Mon Sep 17 00:00:00 2001 From: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com> Date: Thu, 25 Jul 2024 15:22:05 -0700 Subject: [PATCH] `docImport`s for the widgets library (#152339) https://github.com/flutter/flutter/issues/150800. The 2nd batch of `widgets` library `@docImport`s. After this patch, in the `widgets` library: ``` Can not fully resolve ../../flutter/packages/flutter/lib/src/widgets/scroll_view.dart: (TargetPlatformVariant.mobile) Can not fully resolve ../../flutter/packages/flutter/lib/src/widgets/_platform_selectable_region_context_menu_web.dart: (ui_web.platformViewRegistry.registerViewFactory) Can not fully resolve ../../flutter/packages/flutter/lib/src/widgets/primary_scroll_controller.dart: (TargetPlatformVariant.mobile) Can not fully resolve ../../flutter/packages/flutter/lib/src/widgets/selectable_region.dart: (material, WidgetTester.dragFrom) Can not fully resolve ../../flutter/packages/flutter/lib/src/widgets/basic.dart: (ui.Gradient.linear) Can not fully resolve ../../flutter/packages/flutter/lib/src/widgets/framework.dart: (Finder) Can not fully resolve ../../flutter/packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart: (WidgetTester.pumpAndSettle) Can not fully resolve ../../flutter/packages/flutter/lib/src/widgets/binding.dart: (WidgetTester.restartAndRestore, WidgetTester.pumpWidget, TestWidgetsFlutterBinding, testWidgets, TestWidgetsFlutterBinding.ensureInitialized) Can not fully resolve ../../flutter/packages/flutter/lib/src/widgets/localizations.dart: (GlobalWidgetsLocalizations) Can not fully resolve ../../flutter/packages/flutter/lib/src/widgets/scroll_controller.dart: (WidgetTester.pumpAndSettle) Can not fully resolve ../../flutter/packages/flutter/lib/src/widgets/scrollbar.dart: (TargetPlatformVariant.desktop) 21 out-of-scope references in 11 files, 16 unique symbols were left unresolved. ``` --- packages/flutter/lib/src/widgets/app.dart | 4 ++-- .../lib/src/widgets/draggable_scrollable_sheet.dart | 2 +- packages/flutter/lib/src/widgets/editable_text.dart | 4 ++-- packages/flutter/lib/src/widgets/framework.dart | 4 ++-- packages/flutter/lib/src/widgets/modal_barrier.dart | 2 +- packages/flutter/lib/src/widgets/service_extensions.dart | 1 + packages/flutter/lib/src/widgets/widget_inspector.dart | 9 ++++++--- 7 files changed, 15 insertions(+), 11 deletions(-) diff --git a/packages/flutter/lib/src/widgets/app.dart b/packages/flutter/lib/src/widgets/app.dart index 3a1d5e072be..b19842e50de 100644 --- a/packages/flutter/lib/src/widgets/app.dart +++ b/packages/flutter/lib/src/widgets/app.dart @@ -665,7 +665,7 @@ class WidgetsApp extends StatefulWidget { /// /// When a named route is pushed with [Navigator.pushNamed], the route name is /// looked up in this map. If the name is present, the associated - /// [widgets.WidgetBuilder] is used to construct a [PageRoute] specified by + /// [WidgetBuilder] is used to construct a [PageRoute] specified by /// [pageRouteBuilder] to perform an appropriate transition, including [Hero] /// animations, to the new route. /// @@ -1359,7 +1359,7 @@ class _WidgetsAppState extends State with WidgetsBindingObserver { AppLifecycleState? _appLifecycleState; - /// The default value for [onNavigationNotification]. + /// The default value for [WidgetsApp.onNavigationNotification]. /// /// Does nothing and stops bubbling if the app is detached. Otherwise, updates /// the platform with [NavigationNotification.canHandlePop] and stops diff --git a/packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart b/packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart index c1f8899d0fe..9e78c9bf00a 100644 --- a/packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart +++ b/packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart @@ -1071,7 +1071,7 @@ class _DraggableScrollableActuatorState extends State with AutomaticKeepAliveClien } - /// The default behavior used if [onTapOutside] is null. + /// The default behavior used if [EditableText.onTapOutside] is null. /// /// The `event` argument is the [PointerDownEvent] that caused the notification. void _defaultOnTapOutside(PointerDownEvent event) { @@ -5748,7 +5748,7 @@ class _ScribblePlaceholder extends WidgetSpan { /// See also: /// /// * [String.runes], which deals with code points like this class. -/// * [String.characters], which deals with graphemes. +/// * [Characters], which deals with graphemes. /// * [CharacterBoundary], which is a [TextBoundary] like this class, but whose /// boundaries are graphemes instead of code points. class _CodePointBoundary extends TextBoundary { diff --git a/packages/flutter/lib/src/widgets/framework.dart b/packages/flutter/lib/src/widgets/framework.dart index 86706ac05b0..db48089acaf 100644 --- a/packages/flutter/lib/src/widgets/framework.dart +++ b/packages/flutter/lib/src/widgets/framework.dart @@ -2651,8 +2651,8 @@ final class BuildScope { /// /// This is necessary to preserve the sort order defined by [Element._sort]. /// - /// This field is set to null when [buildScope] is not actively rebuilding - /// the widget tree. + /// This field is set to null when [BuildOwner.buildScope] is not actively + /// rebuilding the widget tree. bool? _dirtyElementsNeedsResorting; final List _dirtyElements = []; diff --git a/packages/flutter/lib/src/widgets/modal_barrier.dart b/packages/flutter/lib/src/widgets/modal_barrier.dart index d7a012138cd..603afc3db5e 100644 --- a/packages/flutter/lib/src/widgets/modal_barrier.dart +++ b/packages/flutter/lib/src/widgets/modal_barrier.dart @@ -31,7 +31,7 @@ import 'transitions.dart'; /// * [ModalBarrier], which utilizes this widget to adjust the barrier focus /// size based on the size of the content layer rendered on top of it. class _SemanticsClipper extends SingleChildRenderObjectWidget{ - /// creates a [SemanticsClipper] that updates the size of the + /// creates a [_SemanticsClipper] that updates the size of the /// [SemanticsNode.rect] of its child based on the value inside the provided /// [ValueNotifier], or a default value of [EdgeInsets.zero]. const _SemanticsClipper({ diff --git a/packages/flutter/lib/src/widgets/service_extensions.dart b/packages/flutter/lib/src/widgets/service_extensions.dart index 8e4bc7a8fe0..53ce821cd4b 100644 --- a/packages/flutter/lib/src/widgets/service_extensions.dart +++ b/packages/flutter/lib/src/widgets/service_extensions.dart @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +/// @docImport 'dart:developer'; /// @docImport 'package:flutter/foundation.dart'; /// @docImport 'package:flutter/rendering.dart'; /// diff --git a/packages/flutter/lib/src/widgets/widget_inspector.dart b/packages/flutter/lib/src/widgets/widget_inspector.dart index acdee416df8..3e1ea1cc3e4 100644 --- a/packages/flutter/lib/src/widgets/widget_inspector.dart +++ b/packages/flutter/lib/src/widgets/widget_inspector.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 'dart:ui'; +library; + import 'dart:async'; import 'dart:collection' show HashMap; import 'dart:convert'; @@ -543,11 +546,11 @@ class _ScreenshotPaintingContext extends PaintingContext { /// size of [renderBounds] multiplied by [pixelRatio]. /// /// To use [toImage], the render object must have gone through the paint phase - /// (i.e. [debugNeedsPaint] must be false). + /// (i.e. [RenderObject.debugNeedsPaint] must be false). /// /// The [pixelRatio] describes the scale between the logical pixels and the /// size of the output image. It is independent of the - /// [window.devicePixelRatio] for the device, so specifying 1.0 (the default) + /// [FlutterView.devicePixelRatio] for the device, so specifying 1.0 (the default) /// will give you a 1:1 mapping between logical pixels and the output pixels /// in the image. /// @@ -917,7 +920,7 @@ mixin WidgetInspectorService { /// `value` reflects the newly updated service extension value. /// /// This will be called automatically for service extensions registered via - /// [registerBoolServiceExtension]. + /// [BindingBase.registerBoolServiceExtension]. void _postExtensionStateChangedEvent(String name, Object? value) { postEvent( 'Flutter.ServiceExtensionStateChanged',