Fix docImport issues (#160918)

Work towards https://github.com/flutter/flutter/issues/150800
This commit is contained in:
Michael Goderbauer 2024-12-30 10:31:41 -08:00 committed by GitHub
parent 9fd5bddc65
commit ec66fe4669
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
26 changed files with 56 additions and 9 deletions

View File

@ -3,6 +3,11 @@
// found in the LICENSE file.
/// @docImport 'package:flutter/material.dart';
///
/// @docImport 'checkbox.dart';
/// @docImport 'radio.dart';
/// @docImport 'switch.dart';
/// @docImport 'text_theme.dart';
library;
import 'package:flutter/widgets.dart';

View File

@ -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 'switch.dart';
library;
import 'dart:collection';
import 'dart:math' as math;
@ -75,7 +78,7 @@ const Duration _kFadeDuration = Duration(milliseconds: 165);
/// the parent gets rebuilt.
///
/// This example also demonstrates how to use the [disabledChildren] property by
/// toggling each [Switch] to enable or disable the segments.
/// toggling each [CupertinoSwitch] to enable or disable the segments.
///
/// ** See code in examples/api/lib/cupertino/segmented_control/cupertino_segmented_control.0.dart **
/// {@end-tool}

View File

@ -8,6 +8,8 @@
// void setState(VoidCallback fn) { }
/// @docImport 'package:flutter/material.dart';
///
/// @docImport 'list_tile.dart';
library;
import 'dart:ui';

View File

@ -1445,7 +1445,7 @@ class TextTreeRenderer {
/// The JSON representation of a [DiagnosticsNode].
typedef _JsonDiagnosticsNode = Map<String, Object?>;
/// Stack containing [DiagnosticNode]s to convert to JSON and the callback to
/// Stack containing [DiagnosticsNode]s to convert to JSON and the callback to
/// call with the JSON.
///
/// Using a stack is required to process the widget tree iteratively instead of

View File

@ -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 'package:flutter/cupertino.dart';
///
/// @docImport 'drawer.dart';
/// @docImport 'list_tile_theme.dart';
library;

View File

@ -705,7 +705,7 @@ class _NavigationDestinationInfo extends InheritedWidget {
/// The text style of the label.
final MaterialStateProperty<TextStyle?>? labelTextStyle;
/// The padding around the [label] widget.
/// The padding around the label.
///
/// Defaults to a padding of 4 pixels on the top.
final EdgeInsetsGeometry? labelPadding;

View File

@ -3,6 +3,7 @@
// found in the LICENSE file.
/// @docImport 'app.dart';
/// @docImport 'color_scheme.dart';
/// @docImport 'page.dart';
/// @docImport 'predictive_back_page_transitions_builder.dart';
library;

View File

@ -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';
library;
import 'dart:async';
import 'dart:math' as math;
import 'dart:ui';

View File

@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'color_scheme.dart';
/// @docImport 'range_slider.dart';
/// @docImport 'text_theme.dart';
library;
import 'dart:math' as math;

View File

@ -12,7 +12,7 @@ import 'image_stream.dart';
///
/// This occurs on the web when the image resource is from a different origin
/// and is not configured for CORS. Since the image bytes cannot be directly
/// fetched, [ui.Image]s cannot be created from it. However, the image can
/// fetched, [Image]s cannot be created from it. However, the image can
/// still be displayed if an <img> element is used.
class WebImageInfo implements ImageInfo {
/// Creates a new [WebImageInfo] from a given <img> element.

View File

@ -12,6 +12,7 @@ import 'dart:async';
import 'dart:io';
import 'dart:math' as math;
import 'dart:ui' as ui;
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
@ -268,7 +269,7 @@ typedef ImageDecoderCallback =
///
/// The following shows the code required to write a widget that fully conforms
/// to the [ImageProvider] and [Widget] protocols. (It is essentially a
/// bare-bones version of the [widgets.Image] widget.)
/// bare-bones version of the [Image] widget.)
///
/// ```dart
/// class MyImage extends StatefulWidget {

View File

@ -115,7 +115,7 @@ const double _kLowDprLimit = 2.0;
///
/// The following shows the code required to write a widget that fully conforms
/// to the [AssetImage] and [Widget] protocols. (It is essentially a
/// bare-bones version of the [widgets.Image] widget made to work specifically for
/// bare-bones version of the [Image] widget made to work specifically for
/// an [AssetImage].)
///
/// ```dart

View File

@ -163,7 +163,7 @@ class Ticker {
bool get isActive => _future != null;
/// The frame timestamp when the ticker was last started,
/// as reported by [SchedulerBinding.currentFrameTimestamp].
/// as reported by [SchedulerBinding.currentFrameTimeStamp].
Duration? _startTime;
/// Starts the clock for this [Ticker]. If the ticker is not [muted], then this

View File

@ -6,6 +6,7 @@
///
/// @docImport 'package:flutter/material.dart';
/// @docImport 'package:flutter/rendering.dart';
/// @docImport 'package:flutter_test/flutter_test.dart';
library;
import 'dart:math' as math;

View File

@ -2,6 +2,13 @@
// 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/widgets.dart';
///
/// @docImport 'text_input.dart';
library;
import 'package:flutter/foundation.dart';
import 'message_codec.dart';

View File

@ -14,6 +14,7 @@
/// @docImport 'raw_keyboard.dart';
/// @docImport 'raw_keyboard_android.dart';
/// @docImport 'raw_keyboard_fuchsia.dart';
/// @docImport 'scribe.dart';
/// @docImport 'system_chrome.dart';
/// @docImport 'system_navigator.dart';
/// @docImport 'system_sound.dart';

View File

@ -7,6 +7,7 @@
/// @docImport 'package:flutter/rendering.dart';
///
/// @docImport 'live_text.dart';
/// @docImport 'scribe.dart';
/// @docImport 'text_formatter.dart';
library;

View File

@ -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/rendering.dart';
library;
import 'dart:ui_web' as ui_web;
import 'package:flutter/foundation.dart';

View File

@ -387,7 +387,7 @@ class Opacity extends SingleChildRenderObjectWidget {
/// A widget that applies a mask generated by a [Shader] to its child.
///
/// For example, [ShaderMask] can be used to gradually fade out the edge
/// of a child by using a [ui.Gradient.linear] mask.
/// of a child by using a [RadialGradient] mask.
///
/// {@youtube 560 315 https://www.youtube.com/watch?v=7sUL66pTQ7Q}
///

View File

@ -2,7 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'package:flutter/material.dart';
///
/// @docImport 'container.dart';
/// @docImport 'scroll_view.dart';
library;
import 'package:flutter/rendering.dart';

View File

@ -2,6 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'icon.dart';
/// @docImport 'image_icon.dart';
library;
import 'basic.dart';
import 'framework.dart';
import 'icon_theme.dart';

View File

@ -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 'package:flutter/material.dart';
///
/// @docImport 'page_storage.dart';
/// @docImport 'page_view.dart';
/// @docImport 'scroll_metrics.dart';

View File

@ -3,6 +3,7 @@
// found in the LICENSE file.
/// @docImport 'default_text_editing_shortcuts.dart';
/// @docImport 'editable_text.dart';
library;
import 'package:flutter/services.dart';

View File

@ -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';
import 'package:flutter_test/flutter_test.dart';

View File

@ -9,6 +9,8 @@
// material material_animated_icons library, but instead, this test file is an
// implementation of that library, using some of the parts of the real
// material_animated_icons, this give the test access to the private APIs.
/// @docImport 'package:flutter/material.dart';
/// @docImport 'package:flutter/semantics.dart';
library material_animated_icons;
import 'dart:math' as math show pi;

View File

@ -34,7 +34,7 @@ enum ScreenshotFormat {
/// A Flutter Driver command that takes a screenshot.
class ScreenshotCommand extends Command {
/// Constructs this command given a [finder].
/// Constructs this command to take a screenshot.
ScreenshotCommand({super.timeout, this.format = ScreenshotFormat.png});
/// Deserializes this command from the value generated by [serialize].