Skip to content

Commit 3561823

Browse files
authored
[material_ui, cupertino_ui] Fix unresolved doc comment references (flutter#13044)
Companion to flutter#193283. Applies the same fixes to the copies of these files in `material_ui` and `cupertino_ui`. Doc comments only, so no version bump or changelog entry.
1 parent 3c6ce59 commit 3561823

13 files changed

Lines changed: 49 additions & 27 deletions

‎packages/cupertino_ui/lib/src/menu_anchor.dart‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,7 @@ class _FocusLastAction extends ContextAction<_FocusLastIntent> {
15271527
///
15281528
/// The default thickness of the divider is 1 physical pixel.
15291529
class _CupertinoMenuImplicitDivider extends StatelessWidget {
1530-
/// Draws a [_CupertinoMenuImplicitDivider] below a [child].
1530+
/// Draws a [_CupertinoMenuImplicitDivider] below a menu item.
15311531
const _CupertinoMenuImplicitDivider();
15321532

15331533
/// The default color applied to the [_CupertinoMenuImplicitDivider] with
@@ -1963,7 +1963,8 @@ class CupertinoMenuItem extends StatelessWidget implements CupertinoMenuEntry {
19631963
);
19641964

19651965
/// Resolves the title [TextStyle] in response to
1966-
/// [CupertinoThemeData.brightness], [isDestructiveAction], and [enabled].
1966+
/// [CupertinoThemeData.brightness], [isDestructiveAction], and whether
1967+
/// [onPressed] is null.
19671968
//
19681969
// Approximated from the iOS and iPadOS 18.5 simulators.
19691970
TextStyle _resolveDefaultTextStyle(BuildContext context, TextScaler textScaler) {
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
changelog: |
2+
- Fixes unresolved doc comment references.
3+
version: patch

‎packages/material_ui/lib/src/expansion_tile.dart‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// found in the LICENSE file.
44

55
/// @docImport 'circle_avatar.dart';
6+
/// @docImport 'ink_well.dart';
67
/// @docImport 'text_theme.dart';
78
library;
89

‎packages/material_ui/lib/src/input_decorator.dart‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
///
77
/// @docImport 'dropdown.dart';
88
/// @docImport 'ink_well.dart';
9+
/// @docImport 'tabs.dart';
910
/// @docImport 'text_field.dart';
1011
/// @docImport 'text_form_field.dart';
1112
library;

‎packages/material_ui/lib/src/material_button.dart‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
/// @docImport 'elevated_button.dart';
66
/// @docImport 'elevated_button_theme.dart';
7+
/// @docImport 'filled_button.dart';
8+
/// @docImport 'filled_button_theme.dart';
79
/// @docImport 'icon_button.dart';
810
/// @docImport 'outlined_button.dart';
911
/// @docImport 'outlined_button_theme.dart';

‎packages/material_ui/lib/src/material_state.dart‎

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ typedef MaterialPropertyResolver<T> = WidgetPropertyResolver<T>;
103103
/// value will be used for all states.
104104
///
105105
/// To define a `const` [MaterialStateColor], you'll need to extend
106-
/// [MaterialStateColor] and override its [resolve] method. You'll also need
107-
/// to provide a `defaultValue` to the super constructor, so that we can know
108-
/// at compile-time what its default color is.
106+
/// [MaterialStateColor] and override its [MaterialStateColor.resolve] method.
107+
/// You'll also need to provide a `defaultValue` to the super constructor, so
108+
/// that we can know at compile-time what its default color is.
109109
///
110110
/// <callout-box>
111111
///
@@ -287,9 +287,9 @@ typedef MaterialStateOutlinedBorder = WidgetStateOutlinedBorder;
287287
/// value will be used for all states.
288288
///
289289
/// To define a `const` [MaterialStateTextStyle], you'll need to extend
290-
/// [MaterialStateTextStyle] and override its [resolve] method. You'll also need
291-
/// to provide a `defaultValue` to the super constructor, so that we can know
292-
/// at compile-time what its default color is.
290+
/// [MaterialStateTextStyle] and override its [MaterialStateTextStyle.resolve]
291+
/// method. You'll also need to provide a `defaultValue` to the super
292+
/// constructor, so that we can know at compile-time what its default color is.
293293
///
294294
/// See also:
295295
///
@@ -528,8 +528,8 @@ class _WidgetInputBorderMapper extends WidgetStateMapper<InputBorder>
528528
const _WidgetInputBorderMapper(super.map);
529529
}
530530

531-
/// Interface for classes that [resolve] to a value of type `T` based
532-
/// on a widget's interactive "state", which is defined as a set
531+
/// Interface for classes that [MaterialStateProperty.resolve] to a value of
532+
/// type `T` based on a widget's interactive "state", which is defined as a set
533533
/// of [MaterialState]s.
534534
///
535535
/// Learn more about [WidgetStateProperty] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=CylXr3AF3uU).
@@ -539,14 +539,14 @@ class _WidgetInputBorderMapper extends WidgetStateMapper<InputBorder>
539539
/// [WidgetState.focused], [WidgetState.hovered], [WidgetState.pressed]. For
540540
/// example the [InkWell.overlayColor] defines the color that fills the ink well
541541
/// when it's pressed (the "splash color"), focused, or hovered. The [InkWell]
542-
/// uses the overlay color's [resolve] method to compute the color for the
543-
/// ink well's current state.
542+
/// uses the overlay color's [MaterialStateProperty.resolve] method to compute
543+
/// the color for the ink well's current state.
544544
///
545545
/// [ButtonStyle], which is used to configure the appearance of
546546
/// buttons like [TextButton], [ElevatedButton], and [OutlinedButton],
547547
/// has many material state properties. The button widgets keep track
548-
/// of their current material state and [resolve] the button style's
549-
/// material state properties when their value is needed.
548+
/// of their current material state and [MaterialStateProperty.resolve] the
549+
/// button style's material state properties when their value is needed.
550550
///
551551
/// <callout-box>
552552
///
@@ -596,25 +596,28 @@ typedef MaterialStatePropertyAll<T> = WidgetStatePropertyAll<T>;
596596
/// extensions that add support for additional states. See
597597
/// [TextButton] for an example.
598598
///
599-
/// The controller's [value] is its current set of states. Listeners
600-
/// are notified whenever the [value] changes. The [value] should only be
601-
/// changed with [update]; it should not be modified directly.
599+
/// The controller's [MaterialStatesController.value] is its current set of
600+
/// states. Listeners are notified whenever the
601+
/// [MaterialStatesController.value] changes. The
602+
/// [MaterialStatesController.value] should only be changed with
603+
/// [MaterialStatesController.update]; it should not be modified directly.
602604
///
603-
/// The controller's [value] represents the set of states that a
604-
/// widget's visual properties, typically [MaterialStateProperty]
605+
/// The controller's [MaterialStatesController.value] represents the set of
606+
/// states that a widget's visual properties, typically [MaterialStateProperty]
605607
/// values, are resolved against. It is _not_ the intrinsic state of
606608
/// the widget. The widget is responsible for ensuring that the
607-
/// controller's [value] tracks its intrinsic state. For example one
608-
/// cannot request the keyboard focus for a widget by adding
609-
/// [WidgetState.focused] to its controller. When the widget gains the
610-
/// or loses the focus it will [update] its controller's [value] and
611-
/// notify listeners of the change.
609+
/// controller's [MaterialStatesController.value] tracks its intrinsic state.
610+
/// For example one cannot request the keyboard focus for a widget by adding
611+
/// [WidgetState.focused] to its controller. When the widget gains or loses the
612+
/// focus it will [MaterialStatesController.update] its controller's
613+
/// [MaterialStatesController.value] and notify listeners of the change.
612614
///
613615
/// When calling `setState` in a [MaterialStatesController] listener, use the
614616
/// [SchedulerBinding.addPostFrameCallback] to delay the call to `setState` after
615617
/// the frame has been rendered. It's generally prudent to use the
616618
/// [SchedulerBinding.addPostFrameCallback] because some of the widgets that
617-
/// depend on [MaterialStatesController] may call [update] in their build method.
619+
/// depend on [MaterialStatesController] may call
620+
/// [MaterialStatesController.update] in their build method.
618621
/// In such cases, listener's that call `setState` - during the build phase - will cause
619622
/// an error.
620623
///

‎packages/material_ui/lib/src/range_slider_parts.dart‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
/// @docImport 'color_scheme.dart';
66
/// @docImport 'range_slider.dart';
77
/// @docImport 'text_theme.dart';
8+
/// @docImport 'theme_data.dart';
89
library;
910

1011
import 'dart:math' as math;

‎packages/material_ui/lib/src/slider_parts.dart‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// found in the LICENSE file.
44

55
/// @docImport 'color_scheme.dart';
6+
/// @docImport 'range_slider.dart';
67
/// @docImport 'slider.dart';
78
/// @docImport 'text_theme.dart';
89
library;

‎packages/material_ui/lib/src/slider_value_indicator_shape.dart‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
/// @docImport 'range_slider.dart';
6+
/// @docImport 'slider_parts.dart';
7+
library;
8+
59
import 'dart:math' as math;
610

711
import 'package:flutter/foundation.dart';

‎packages/material_ui/lib/src/text_field.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ typedef InputCounterWidgetBuilder = Widget? Function(
5050
required int? maxLength,
5151

5252
/// Whether or not the TextField is currently focused. Mainly provided for
53-
/// the [liveRegion] parameter in the [Semantics] widget for accessibility.
53+
/// the `liveRegion` parameter in the [Semantics] widget for accessibility.
5454
required bool isFocused,
5555
});
5656

0 commit comments

Comments
 (0)