Skip to content

Commit

Permalink
doc imports for enum values (#151548)
Browse files Browse the repository at this point in the history
To verify that dart-lang/sdk@a9e6fef works.

Part of flutter/flutter#150800.
  • Loading branch information
goderbauer authored Jul 10, 2024
1 parent bb637f3 commit a1bd843
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 10 deletions.
4 changes: 4 additions & 0 deletions packages/flutter/lib/painting.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
/// * Use the [TextPainter] class for painting text.
/// * Use [Decoration] (and more concretely [BoxDecoration]) for
/// painting boxes.
///
/// @docImport 'src/painting/box_decoration.dart';
/// @docImport 'src/painting/decoration.dart';
/// @docImport 'src/painting/text_painter.dart';
library painting;

export 'dart:ui' show PlaceholderAlignment, Shadow, TextHeightBehavior, TextLeadingDistribution, kTextHeightNone;
Expand Down
9 changes: 9 additions & 0 deletions packages/flutter/lib/rendering.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
/// [ServicesBinding], [GestureBinding], [SchedulerBinding], [PaintingBinding],
/// and [RendererBinding]. The rendering library does not automatically create a
/// binding, but relies on one being initialized with those features.
///
/// @docImport 'package:flutter/foundation.dart';
/// @docImport 'package:flutter/gestures.dart';
/// @docImport 'package:flutter/scheduler.dart';
/// @docImport 'package:flutter/services.dart';
///
/// @docImport 'src/rendering/binding.dart';
/// @docImport 'src/rendering/box.dart';
/// @docImport 'src/rendering/object.dart';
library rendering;

export 'package:flutter/foundation.dart' show
Expand Down
8 changes: 4 additions & 4 deletions packages/flutter/lib/src/cupertino/colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// 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 'package:flutter/material.dart';
///
/// @docImport 'button.dart';
/// @docImport 'nav_bar.dart';
Expand Down Expand Up @@ -68,7 +68,7 @@ abstract final class CupertinoColors {
///
/// See also:
///
/// * [material.Colors.white], the same color, in the Material Design palette.
/// * [Colors.white], the same color, in the Material Design palette.
/// * [black], opaque black in the [CupertinoColors] palette.
static const Color white = Color(0xFFFFFFFF);

Expand All @@ -78,15 +78,15 @@ abstract final class CupertinoColors {
///
/// See also:
///
/// * [material.Colors.black], the same color, in the Material Design palette.
/// * [Colors.black], the same color, in the Material Design palette.
/// * [white], opaque white in the [CupertinoColors] palette.
static const Color black = Color(0xFF000000);

/// A fully-transparent color, completely invisible.
///
/// See also:
///
/// * [material.Colors.transparent], the same color, in the Material Design palette.
/// * [Colors.transparent], the same color, in the Material Design palette.
static const Color transparent = Color(0x00000000);

/// Used in iOS 10 for light background fills such as the chat bubble background.
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/foundation/_bitfield_io.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class BitField<T extends dynamic> implements bitfield.BitField<T> {
: assert(_length <= _smiBits),
_bits = _allZeros;

/// The dart:io implementation of [bitfield.Bitfield.filled].
/// The dart:io implementation of [bitfield.BitField.filled].
BitField.filled(this._length, bool value)
: assert(_length <= _smiBits),
_bits = value ? _allOnes : _allZeros;
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/foundation/_bitfield_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class BitField<T extends dynamic> implements bitfield.BitField<T> {
// ignore: avoid_unused_constructor_parameters
BitField(int length);

/// The web implementation of [bitfield.Bitfield.filled].
/// The web implementation of [bitfield.BitField.filled].
// Can remove when we have metaclasses.
// ignore: avoid_unused_constructor_parameters
BitField.filled(int length, bool value);
Expand Down
7 changes: 7 additions & 0 deletions packages/flutter/lib/src/foundation/service_extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 'binding.dart';
/// @docImport 'debug.dart';
/// @docImport 'platform.dart';
library;

/// Service extension constants for the foundation library.
///
/// These constants will be used when registering service extensions in the
Expand Down
5 changes: 4 additions & 1 deletion packages/flutter/lib/src/painting/image_decoder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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:typed_data';
import 'dart:ui' as ui show Codec, FrameInfo, Image, ImmutableBuffer;

Expand All @@ -16,7 +19,7 @@ import 'binding.dart';
/// If the image is animated, this returns the first frame. Consider
/// [instantiateImageCodec] if support for animated images is necessary.
///
/// This function differs from [ui.decodeImageFromList] in that it defers to
/// This function differs from [decodeImageFromList] in that it defers to
/// [PaintingBinding.instantiateImageCodecWithSize], and therefore can be mocked
/// in tests.
Future<ui.Image> decodeImageFromList(Uint8List bytes) async {
Expand Down
4 changes: 2 additions & 2 deletions packages/flutter/lib/src/painting/text_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// 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 'package:flutter/material.dart';
library;

import 'dart:collection';
Expand Down Expand Up @@ -73,7 +73,7 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
/// ### Opacity and Color
///
/// Each line here is progressively more opaque. The base color is
/// [material.Colors.black], and [Color.withOpacity] is used to create a
/// [Colors.black], and [Color.withOpacity] is used to create a
/// derivative color with the desired opacity. The root [TextSpan] for this
/// [RichText] widget is explicitly given the ambient [DefaultTextStyle], since
/// [RichText] does not do that automatically. The inner [TextStyle] objects are
Expand Down
3 changes: 3 additions & 0 deletions packages/flutter/lib/src/scheduler/service_extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 'binding.dart';
library;

/// Service extension constants for the scheduler library.
///
/// These constants will be used when registering service extensions in the
Expand Down
4 changes: 4 additions & 0 deletions packages/flutter/lib/src/services/service_extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 'binding.dart';
/// @docImport 'debug.dart';
library;

/// Service extension constants for the services library.
///
/// These constants will be used when registering service extensions in the
Expand Down
3 changes: 3 additions & 0 deletions packages/flutter/test/painting/no_op_codec.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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/painting.dart';
library;

import 'dart:ui';

/// Returns a [Codec] that throws on all member invocations.
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/test/widgets/shortcuts_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2072,7 +2072,7 @@ class TestAction extends CallbackAction<Intent> {
/// An activator that accepts down events that has [key] as the logical key.
///
/// This class is used only to tests. It is intentionally designed poorly by
/// returning null in [triggers], and checks [key] in [acceptsEvent].
/// returning null in [triggers], and checks [key] in [accepts].
class DumbLogicalActivator extends ShortcutActivator {
const DumbLogicalActivator(this.key);

Expand Down

0 comments on commit a1bd843

Please sign in to comment.