Skip to content

Commit e6b99e0

Browse files
authored
[material_ui, cupertino_ui] Fix API doc references (flutter#12274)
Fix doc references in material_ui and cupertino_ui Towards flutter#189629 I also commented out youtube directives since they do not work outside of the SDK. There are some references we cannot fix in the design packages themselves, largely due tot he fact that material_ui and cupertino_ui export the widgets library. That pulls in doc references from the widgets library that cannot be resolved outside of the scope of the SDK. We can change the doc upstream in the SDK, but that feel like a poor choice to make the docs less helpful in the SDK in order to resolve a reference issue in a downstream package. Something we are planning for after the initial 1.0 is to remove the export of widgets from both packages, which will resolve the remaining issues. ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
1 parent 32bb9bb commit e6b99e0

52 files changed

Lines changed: 74 additions & 54 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎packages/cupertino_ui/lib/cupertino_ui.dart‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@
1111
/// example the [Material
1212
/// Design](https://docs.flutter.dev/ui/widgets/material) set.
1313
///
14-
/// {@youtube 560 315 https://www.youtube.com/watch?v=3PdUaidHc-E}
14+
/// Learn more about Cupertino widgets on the [Flutter YouTube channel](https://www.youtube.com/watch?v=3PdUaidHc-E).
1515
///
1616
/// See also:
1717
///
1818
/// * [flutter.dev/widgets/cupertino](https://docs.flutter.dev/ui/widgets/cupertino)
1919
/// for a catalog of all Cupertino widgets.
2020
/// * [flutter.dev/widgets](https://docs.flutter.dev/ui/widgets)
2121
/// for a catalog of commonly-used Flutter widgets.
22+
/// @docImport 'package:flutter_test/flutter_test.dart';
23+
/// @docImport 'package:intl/intl.dart';
2224
library cupertino_ui;
2325

2426
export 'package:flutter/widgets.dart';

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const Color _kActiveTickColor = CupertinoDynamicColor.withBrightness(
1919

2020
/// An iOS-style activity indicator that spins clockwise.
2121
///
22-
/// {@youtube 560 315 https://www.youtube.com/watch?v=AENVH-ZqKDQ}
22+
/// Learn more about [CupertinoActivityIndicator] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=AENVH-ZqKDQ).
2323
///
2424
/// <callout-box>
2525
///

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const List<double> _kDisabledDarkGradientOpacities = <double>[0.08, 0.14];
4848

4949
/// A macOS style checkbox.
5050
///
51-
/// {@youtube 560 315 https://www.youtube.com/watch?v=ua54JU7k1Us}
51+
/// Learn more about [CupertinoCheckbox] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=ua54JU7k1Us).
5252
///
5353
/// The checkbox itself does not maintain any state. Instead, when the state of
5454
/// the checkbox changes, the widget calls the [onChanged] callback. Most

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ bool _isInAccessibilityMode(BuildContext context) {
195195

196196
/// An iOS-style alert dialog.
197197
///
198-
/// {@youtube 560 315 https://www.youtube.com/watch?v=75CsnyRXf5I}
198+
/// Learn more about [CupertinoAlertDialog] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=75CsnyRXf5I).
199199
///
200200
/// An alert dialog informs the user about situations that require
201201
/// acknowledgment. An alert dialog has an optional title, optional content,
@@ -1052,7 +1052,7 @@ class _ActionSheetGestureDetector extends StatelessWidget {
10521052

10531053
/// An iOS-style action sheet.
10541054
///
1055-
/// {@youtube 560 315 https://www.youtube.com/watch?v=U-ao8p4A82k}
1055+
/// Learn more about [CupertinoActionSheet] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=U-ao8p4A82k).
10561056
///
10571057
/// An action sheet is a specific style of alert that presents the user
10581058
/// with a set of two or more choices related to the current context.

‎packages/cupertino_ui/lib/src/l10n/generated_cupertino_localizations.dart‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
// To regenerate the file, use:
77
// dart script/l10n/bin/gen_localizations.dart --overwrite
88

9+
/// @docImport 'package:intl/intl.dart';
10+
library;
11+
912
import 'dart:collection';
1013

1114
import 'package:flutter/widgets.dart';

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const List<double> _kDisabledDarkGradientOpacities = <double>[0.08, 0.14];
5959

6060
/// A widget that builds a [RawRadio] with a macOS-style UI.
6161
///
62-
/// {@youtube 560 315 https://www.youtube.com/watch?v=D0xwcz2IqAY}
62+
/// Learn more about [CupertinoRadio] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=D0xwcz2IqAY).
6363
///
6464
/// Used to select between a number of mutually exclusive values. When one radio
6565
/// button in a group is selected, the other radio buttons in the group are

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const double _kScrollbarCrossAxisMargin = 3.0;
3535
/// To add a scrollbar to a [ScrollView], wrap the scroll view widget in
3636
/// a [CupertinoScrollbar] widget.
3737
///
38-
/// {@youtube 560 315 https://www.youtube.com/watch?v=DbkIQSvwnZc}
38+
/// Learn more about [CupertinoScrollbar] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=DbkIQSvwnZc).
3939
///
4040
/// {@macro flutter.widgets.Scrollbar}
4141
///

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ typedef _GetSheetDragged = bool Function();
105105
/// Shows a Cupertino-style sheet widget that slides up from the bottom of the
106106
/// screen and stacks the previous route behind the new sheet.
107107
///
108-
/// {@youtube 560 315 https://www.youtube.com/watch?v=5H-WvH5O29I}
108+
/// Learn more about [CupertinoSheetRoute] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=5H-WvH5O29I).
109109
///
110110
/// This is a convenience method for displaying [CupertinoSheetRoute] for most
111111
/// use cases. The Widget returned from `scrollableBuilder` will be used to display
@@ -591,7 +591,7 @@ class _StretchDragControllerProvider extends InheritedWidget {
591591

592592
/// Route for displaying an iOS sheet styled page.
593593
///
594-
/// {@youtube 560 315 https://www.youtube.com/watch?v=5H-WvH5O29I}
594+
/// Learn more about [CupertinoSheetRoute] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=5H-WvH5O29I).
595595
///
596596
/// The `CupertinoSheetRoute` will slide up from the bottom of the screen and stop
597597
/// below the top of the screen. If the previous route is a non-sheet route, then

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const double _kVelocityThreshold = 1.0;
3636

3737
/// An iOS-style slider.
3838
///
39-
/// {@youtube 560 315 https://www.youtube.com/watch?v=ufb4gIPDmEs}
39+
/// Learn more about [CupertinoSlider] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=ufb4gIPDmEs).
4040
///
4141
/// Used to select from a range of values.
4242
///

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ class _SegmentSeparatorState extends State<_SegmentSeparator>
309309

310310
/// An iOS 13 style segmented control.
311311
///
312-
/// {@youtube 560 315 https://www.youtube.com/watch?v=esnBf6V4C34}
312+
/// Learn more about [CupertinoSlidingSegmentedControl] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=esnBf6V4C34).
313313
///
314314
/// Displays the widgets provided in the [Map] of [children] in a horizontal list.
315315
/// It allows the user to select between a number of mutually exclusive options,

0 commit comments

Comments
 (0)