diff --git a/packages/cupertino_ui/lib/cupertino_ui.dart b/packages/cupertino_ui/lib/cupertino_ui.dart index 82620d849398..698aaf04a5cc 100644 --- a/packages/cupertino_ui/lib/cupertino_ui.dart +++ b/packages/cupertino_ui/lib/cupertino_ui.dart @@ -11,7 +11,7 @@ /// example the [Material /// Design](https://docs.flutter.dev/ui/widgets/material) set. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=3PdUaidHc-E} +/// Learn more about Cupertino widgets on the [Flutter YouTube channel](https://www.youtube.com/watch?v=3PdUaidHc-E). /// /// See also: /// @@ -19,6 +19,8 @@ /// for a catalog of all Cupertino widgets. /// * [flutter.dev/widgets](https://docs.flutter.dev/ui/widgets) /// for a catalog of commonly-used Flutter widgets. +/// @docImport 'package:flutter_test/flutter_test.dart'; +/// @docImport 'package:intl/intl.dart'; library cupertino_ui; export 'package:flutter/widgets.dart'; diff --git a/packages/cupertino_ui/lib/src/activity_indicator.dart b/packages/cupertino_ui/lib/src/activity_indicator.dart index 511882bfe08f..2b8900a2e481 100644 --- a/packages/cupertino_ui/lib/src/activity_indicator.dart +++ b/packages/cupertino_ui/lib/src/activity_indicator.dart @@ -19,7 +19,7 @@ const Color _kActiveTickColor = CupertinoDynamicColor.withBrightness( /// An iOS-style activity indicator that spins clockwise. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=AENVH-ZqKDQ} +/// Learn more about [CupertinoActivityIndicator] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=AENVH-ZqKDQ). /// /// /// diff --git a/packages/cupertino_ui/lib/src/checkbox.dart b/packages/cupertino_ui/lib/src/checkbox.dart index 36628acbf381..55c1c6d96f2a 100644 --- a/packages/cupertino_ui/lib/src/checkbox.dart +++ b/packages/cupertino_ui/lib/src/checkbox.dart @@ -48,7 +48,7 @@ const List _kDisabledDarkGradientOpacities = [0.08, 0.14]; /// A macOS style checkbox. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=ua54JU7k1Us} +/// Learn more about [CupertinoCheckbox] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=ua54JU7k1Us). /// /// The checkbox itself does not maintain any state. Instead, when the state of /// the checkbox changes, the widget calls the [onChanged] callback. Most diff --git a/packages/cupertino_ui/lib/src/dialog.dart b/packages/cupertino_ui/lib/src/dialog.dart index 72e6f64057de..8253d30ddfb5 100644 --- a/packages/cupertino_ui/lib/src/dialog.dart +++ b/packages/cupertino_ui/lib/src/dialog.dart @@ -195,7 +195,7 @@ bool _isInAccessibilityMode(BuildContext context) { /// An iOS-style alert dialog. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=75CsnyRXf5I} +/// Learn more about [CupertinoAlertDialog] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=75CsnyRXf5I). /// /// An alert dialog informs the user about situations that require /// acknowledgment. An alert dialog has an optional title, optional content, @@ -1052,7 +1052,7 @@ class _ActionSheetGestureDetector extends StatelessWidget { /// An iOS-style action sheet. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=U-ao8p4A82k} +/// Learn more about [CupertinoActionSheet] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=U-ao8p4A82k). /// /// An action sheet is a specific style of alert that presents the user /// with a set of two or more choices related to the current context. diff --git a/packages/cupertino_ui/lib/src/l10n/generated_cupertino_localizations.dart b/packages/cupertino_ui/lib/src/l10n/generated_cupertino_localizations.dart index 17c3fa713666..adcce31bc5c0 100644 --- a/packages/cupertino_ui/lib/src/l10n/generated_cupertino_localizations.dart +++ b/packages/cupertino_ui/lib/src/l10n/generated_cupertino_localizations.dart @@ -6,6 +6,9 @@ // To regenerate the file, use: // dart script/l10n/bin/gen_localizations.dart --overwrite +/// @docImport 'package:intl/intl.dart'; +library; + import 'dart:collection'; import 'package:flutter/widgets.dart'; diff --git a/packages/cupertino_ui/lib/src/radio.dart b/packages/cupertino_ui/lib/src/radio.dart index b883dd24e1bb..ed7a3e701ee4 100644 --- a/packages/cupertino_ui/lib/src/radio.dart +++ b/packages/cupertino_ui/lib/src/radio.dart @@ -59,7 +59,7 @@ const List _kDisabledDarkGradientOpacities = [0.08, 0.14]; /// A widget that builds a [RawRadio] with a macOS-style UI. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=D0xwcz2IqAY} +/// Learn more about [CupertinoRadio] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=D0xwcz2IqAY). /// /// Used to select between a number of mutually exclusive values. When one radio /// button in a group is selected, the other radio buttons in the group are diff --git a/packages/cupertino_ui/lib/src/scrollbar.dart b/packages/cupertino_ui/lib/src/scrollbar.dart index d3387c15e413..2658e97f2d76 100644 --- a/packages/cupertino_ui/lib/src/scrollbar.dart +++ b/packages/cupertino_ui/lib/src/scrollbar.dart @@ -35,7 +35,7 @@ const double _kScrollbarCrossAxisMargin = 3.0; /// To add a scrollbar to a [ScrollView], wrap the scroll view widget in /// a [CupertinoScrollbar] widget. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=DbkIQSvwnZc} +/// Learn more about [CupertinoScrollbar] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=DbkIQSvwnZc). /// /// {@macro flutter.widgets.Scrollbar} /// diff --git a/packages/cupertino_ui/lib/src/sheet.dart b/packages/cupertino_ui/lib/src/sheet.dart index 4512d4157398..0044e001dcaf 100644 --- a/packages/cupertino_ui/lib/src/sheet.dart +++ b/packages/cupertino_ui/lib/src/sheet.dart @@ -105,7 +105,7 @@ typedef _GetSheetDragged = bool Function(); /// Shows a Cupertino-style sheet widget that slides up from the bottom of the /// screen and stacks the previous route behind the new sheet. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=5H-WvH5O29I} +/// Learn more about [CupertinoSheetRoute] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=5H-WvH5O29I). /// /// This is a convenience method for displaying [CupertinoSheetRoute] for most /// use cases. The Widget returned from `scrollableBuilder` will be used to display @@ -591,7 +591,7 @@ class _StretchDragControllerProvider extends InheritedWidget { /// Route for displaying an iOS sheet styled page. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=5H-WvH5O29I} +/// Learn more about [CupertinoSheetRoute] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=5H-WvH5O29I). /// /// The `CupertinoSheetRoute` will slide up from the bottom of the screen and stop /// below the top of the screen. If the previous route is a non-sheet route, then diff --git a/packages/cupertino_ui/lib/src/slider.dart b/packages/cupertino_ui/lib/src/slider.dart index 60f4ddf7dfdc..d047c8c5adea 100644 --- a/packages/cupertino_ui/lib/src/slider.dart +++ b/packages/cupertino_ui/lib/src/slider.dart @@ -36,7 +36,7 @@ const double _kVelocityThreshold = 1.0; /// An iOS-style slider. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=ufb4gIPDmEs} +/// Learn more about [CupertinoSlider] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=ufb4gIPDmEs). /// /// Used to select from a range of values. /// diff --git a/packages/cupertino_ui/lib/src/sliding_segmented_control.dart b/packages/cupertino_ui/lib/src/sliding_segmented_control.dart index 6a33ec2ec6f1..4fdb370b8b5c 100644 --- a/packages/cupertino_ui/lib/src/sliding_segmented_control.dart +++ b/packages/cupertino_ui/lib/src/sliding_segmented_control.dart @@ -309,7 +309,7 @@ class _SegmentSeparatorState extends State<_SegmentSeparator> /// An iOS 13 style segmented control. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=esnBf6V4C34} +/// Learn more about [CupertinoSlidingSegmentedControl] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=esnBf6V4C34). /// /// Displays the widgets provided in the [Map] of [children] in a horizontal list. /// It allows the user to select between a number of mutually exclusive options, diff --git a/packages/cupertino_ui/lib/src/switch.dart b/packages/cupertino_ui/lib/src/switch.dart index 81d6ba9f3de2..f679e70f3eaf 100644 --- a/packages/cupertino_ui/lib/src/switch.dart +++ b/packages/cupertino_ui/lib/src/switch.dart @@ -69,7 +69,7 @@ const CupertinoDynamicColor _kOffLabelColor = CupertinoDynamicColor.withBrightne /// /// Used to toggle the on/off state of a single setting. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=24tg_N4sdMQ} +/// Learn more about [CupertinoSwitch] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=24tg_N4sdMQ). /// /// The switch itself does not maintain its toggle state. Instead, when the /// toggle state of the switch changes, the widget calls the [onChanged] diff --git a/packages/material_ui/lib/material_ui.dart b/packages/material_ui/lib/material_ui.dart index 634995c18683..92dd582432fa 100644 --- a/packages/material_ui/lib/material_ui.dart +++ b/packages/material_ui/lib/material_ui.dart @@ -6,7 +6,7 @@ /// /// To use, import `package:material_ui/material_ui.dart`. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=DL0Ix1lnC4w} +/// Learn more about Material Design widgets on the [Flutter YouTube channel](https://www.youtube.com/watch?v=DL0Ix1lnC4w). /// /// See also: /// @@ -14,6 +14,8 @@ /// for a catalog of commonly-used Material component widgets. /// * [m3.material.io](https://m3.material.io/) for the Material 3 specification /// * [m2.material.io](https://m2.material.io/) for the Material 2 specification +/// @docImport 'package:flutter_test/flutter_test.dart'; +/// @docImport 'package:intl/intl.dart'; library material_ui; export 'package:flutter/widgets.dart'; diff --git a/packages/material_ui/lib/src/about.dart b/packages/material_ui/lib/src/about.dart index 41bb4c6b6f12..be76f7f4ccb6 100644 --- a/packages/material_ui/lib/src/about.dart +++ b/packages/material_ui/lib/src/about.dart @@ -333,7 +333,7 @@ const double _textVerticalSeparation = 18.0; /// /// To show an [AboutDialog], use [showAboutDialog]. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=YFCSODyFxbE} +/// Learn more about [AboutDialog] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=YFCSODyFxbE). /// /// If the application has a [Drawer], the [AboutListTile] widget can make the /// process of showing an about dialog simpler. diff --git a/packages/material_ui/lib/src/animated_icons/animated_icons.dart b/packages/material_ui/lib/src/animated_icons/animated_icons.dart index 7b917bf8d20f..1bf448e6a6ff 100644 --- a/packages/material_ui/lib/src/animated_icons/animated_icons.dart +++ b/packages/material_ui/lib/src/animated_icons/animated_icons.dart @@ -14,7 +14,7 @@ part of material_animated_icons; // ignore: use_string_in_part_of_directives /// /// The available icons are specified in [AnimatedIcons]. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=pJcbh8pbvJs} +/// Learn more about [AnimatedIcon] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=pJcbh8pbvJs). /// /// /// diff --git a/packages/material_ui/lib/src/app_bar.dart b/packages/material_ui/lib/src/app_bar.dart index 4cd84ef47684..7997ed4c39b7 100644 --- a/packages/material_ui/lib/src/app_bar.dart +++ b/packages/material_ui/lib/src/app_bar.dart @@ -1520,7 +1520,7 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate { /// common actions with [IconButton]s which are optionally followed by a /// [PopupMenuButton] for less common operations. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=R9C5KMJKluE} +/// Learn more about [SliverAppBar] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=R9C5KMJKluE). /// /// Sliver app bars are typically used as the first child of a /// [CustomScrollView], which lets the app bar integrate with the scroll view so diff --git a/packages/material_ui/lib/src/autocomplete.dart b/packages/material_ui/lib/src/autocomplete.dart index bcb86c4a6717..cb18493c7876 100644 --- a/packages/material_ui/lib/src/autocomplete.dart +++ b/packages/material_ui/lib/src/autocomplete.dart @@ -12,7 +12,7 @@ import 'theme.dart'; /// {@macro flutter.widgets.RawAutocomplete.RawAutocomplete} /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=-Nny8kzW380} +/// Learn more about [Autocomplete] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=-Nny8kzW380). /// /// /// diff --git a/packages/material_ui/lib/src/checkbox_list_tile.dart b/packages/material_ui/lib/src/checkbox_list_tile.dart index d96546802d41..de26fdad200c 100644 --- a/packages/material_ui/lib/src/checkbox_list_tile.dart +++ b/packages/material_ui/lib/src/checkbox_list_tile.dart @@ -34,7 +34,7 @@ enum _CheckboxType { material, adaptive } /// The entire list tile is interactive: tapping anywhere in the tile toggles /// the checkbox. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=RkSqPAn9szs} +/// Learn more about [CheckboxListTile] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=RkSqPAn9szs). /// /// The [value], [onChanged], [activeColor] and [checkColor] properties of this widget are /// identical to the similarly-named properties on the [Checkbox] widget. diff --git a/packages/material_ui/lib/src/data_table.dart b/packages/material_ui/lib/src/data_table.dart index 1972d2e91683..d16cc15ef77f 100644 --- a/packages/material_ui/lib/src/data_table.dart +++ b/packages/material_ui/lib/src/data_table.dart @@ -388,7 +388,7 @@ class DataCell { /// [Material 2](https://material.io/go/design-data-tables) /// design specification. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=ktTajqbhIcY} +/// Learn more about [DataTable] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=ktTajqbhIcY). /// /// ## Performance considerations /// diff --git a/packages/material_ui/lib/src/dialog.dart b/packages/material_ui/lib/src/dialog.dart index 3432029f262c..4d68231347d5 100644 --- a/packages/material_ui/lib/src/dialog.dart +++ b/packages/material_ui/lib/src/dialog.dart @@ -327,7 +327,7 @@ class Dialog extends StatelessWidget { /// title and an optional list of actions. The title is displayed above the /// content and the actions are displayed below the content. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=75CsnyRXf5I} +/// Learn more about [AlertDialog] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=75CsnyRXf5I). /// /// For dialogs that offer the user a choice between several options, consider /// using a [SimpleDialog]. diff --git a/packages/material_ui/lib/src/divider.dart b/packages/material_ui/lib/src/divider.dart index 2fb6e3ae30da..02baf7b5732a 100644 --- a/packages/material_ui/lib/src/divider.dart +++ b/packages/material_ui/lib/src/divider.dart @@ -24,7 +24,7 @@ import 'theme.dart'; /// To create a divider between [ListTile] items, consider using /// [ListTile.divideTiles], which is optimized for this case. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=_liUC641Nmk} +/// Learn more about [Divider] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=_liUC641Nmk). /// /// The box's total height is controlled by [height]. The appropriate /// padding is automatically computed from the height. diff --git a/packages/material_ui/lib/src/drawer.dart b/packages/material_ui/lib/src/drawer.dart index 6d9ce01bb0bb..5e4414ba7b3f 100644 --- a/packages/material_ui/lib/src/drawer.dart +++ b/packages/material_ui/lib/src/drawer.dart @@ -70,7 +70,7 @@ const Duration _kBaseSettleDuration = Duration(milliseconds: 246); /// that's preferred for applications that are configured for Material 3 /// (see [ThemeData.useMaterial3]). /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=WRj86iHihgY} +/// Learn more about [Drawer] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=WRj86iHihgY). /// /// Drawers are typically used with the [Scaffold.drawer] property. The child of /// the drawer is usually a [ListView] whose first child is a [DrawerHeader] diff --git a/packages/material_ui/lib/src/dropdown.dart b/packages/material_ui/lib/src/dropdown.dart index 8368082deafd..59f784647438 100644 --- a/packages/material_ui/lib/src/dropdown.dart +++ b/packages/material_ui/lib/src/dropdown.dart @@ -924,7 +924,7 @@ class DropdownButtonHideUnderline extends InheritedWidget { /// from [DropdownButton] to [DropdownMenu]. /// /// ## Using [DropdownButton] -/// {@youtube 560 315 https://www.youtube.com/watch?v=ZzQ_PWrFihg} +/// Learn more about [DropdownButton] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=ZzQ_PWrFihg). /// /// One ancestor must be a [Material] widget and typically this is /// provided by the app's [Scaffold]. diff --git a/packages/material_ui/lib/src/dropdown_menu.dart b/packages/material_ui/lib/src/dropdown_menu.dart index fdf056b4436f..21798bcc31de 100644 --- a/packages/material_ui/lib/src/dropdown_menu.dart +++ b/packages/material_ui/lib/src/dropdown_menu.dart @@ -150,7 +150,7 @@ enum DropdownMenuCloseBehavior { /// A dropdown menu that can be opened from a [TextField]. The selected /// menu item is displayed in that field. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=giV9AbM2gd8} +/// Learn more about [DropdownMenu] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=giV9AbM2gd8). /// /// This widget is used to help people make a choice from a menu and put the /// selected item into the text input field. People can also filter the list based diff --git a/packages/material_ui/lib/src/expansion_panel.dart b/packages/material_ui/lib/src/expansion_panel.dart index 8669a67b9e74..1f94e8627f89 100644 --- a/packages/material_ui/lib/src/expansion_panel.dart +++ b/packages/material_ui/lib/src/expansion_panel.dart @@ -62,7 +62,7 @@ typedef ExpansionPanelHeaderBuilder = Widget Function(BuildContext context, bool /// expanded or collapsed. The body of the panel is only visible when it is /// expanded. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=2aJZzRMziJc} +/// Learn more about [ExpansionPanel] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=2aJZzRMziJc). /// /// Expansion panels are only intended to be used as children for /// [ExpansionPanelList]. diff --git a/packages/material_ui/lib/src/flexible_space_bar.dart b/packages/material_ui/lib/src/flexible_space_bar.dart index 26045768ecfa..9134310ccd53 100644 --- a/packages/material_ui/lib/src/flexible_space_bar.dart +++ b/packages/material_ui/lib/src/flexible_space_bar.dart @@ -44,7 +44,7 @@ enum StretchMode { /// The part of a Material Design [AppBar] that expands, collapses, and /// stretches. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=mSc7qFzxHDw} +/// Learn more about [FlexibleSpaceBar] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=mSc7qFzxHDw). /// /// Most commonly used in the [SliverAppBar.flexibleSpace] field, a flexible /// space bar expands and contracts as the app scrolls so that the [AppBar] diff --git a/packages/material_ui/lib/src/floating_action_button.dart b/packages/material_ui/lib/src/floating_action_button.dart index 245543295af4..3989b3dcf979 100644 --- a/packages/material_ui/lib/src/floating_action_button.dart +++ b/packages/material_ui/lib/src/floating_action_button.dart @@ -35,7 +35,7 @@ enum _FloatingActionButtonType { regular, small, large, extended } /// to promote a primary action in the application. Floating action buttons are /// most commonly used in the [Scaffold.floatingActionButton] field. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=2uaoEDOgk_I} +/// Learn more about [FloatingActionButton] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=2uaoEDOgk_I). /// /// Use at most a single floating action button per screen. Floating action /// buttons should be used for positive actions such as "create", "share", or diff --git a/packages/material_ui/lib/src/l10n/generated_material_localizations.dart b/packages/material_ui/lib/src/l10n/generated_material_localizations.dart index 486a664dd357..8e27c5de9483 100644 --- a/packages/material_ui/lib/src/l10n/generated_material_localizations.dart +++ b/packages/material_ui/lib/src/l10n/generated_material_localizations.dart @@ -6,6 +6,9 @@ // To regenerate the file, use: // dart script/l10n/bin/gen_localizations.dart --overwrite +/// @docImport 'package:intl/intl.dart'; +library; + import 'dart:collection'; import 'package:flutter/widgets.dart'; diff --git a/packages/material_ui/lib/src/list_tile.dart b/packages/material_ui/lib/src/list_tile.dart index feb865a14dc6..6a8b793d5484 100644 --- a/packages/material_ui/lib/src/list_tile.dart +++ b/packages/material_ui/lib/src/list_tile.dart @@ -168,7 +168,7 @@ enum ListTileTitleAlignment { /// A single fixed-height row that typically contains some text as well as /// a leading or trailing icon. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=l8dj0yPBvgQ} +/// Learn more about [ListTile] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=l8dj0yPBvgQ). /// /// A list tile contains one to three lines of text optionally flanked by icons or /// other widgets, such as check boxes. The icons (or other widgets) for the diff --git a/packages/material_ui/lib/src/material_state.dart b/packages/material_ui/lib/src/material_state.dart index 5aeddc268f1b..65bfc7893172 100644 --- a/packages/material_ui/lib/src/material_state.dart +++ b/packages/material_ui/lib/src/material_state.dart @@ -532,7 +532,7 @@ class _WidgetInputBorderMapper extends WidgetStateMapper /// on a widget's interactive "state", which is defined as a set /// of [MaterialState]s. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=CylXr3AF3uU} +/// Learn more about [WidgetStateProperty] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=CylXr3AF3uU). /// /// Material state properties represent values that depend on a widget's material /// "state". The state is encoded as a set of [MaterialState] values, like diff --git a/packages/material_ui/lib/src/navigation_bar.dart b/packages/material_ui/lib/src/navigation_bar.dart index c9fdcba176c6..7e159f5da665 100644 --- a/packages/material_ui/lib/src/navigation_bar.dart +++ b/packages/material_ui/lib/src/navigation_bar.dart @@ -36,7 +36,7 @@ const double _kMaxLabelTextScaleFactor = 1.3; /// Material 3 Navigation Bar component. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=DVGYddFaLv0} +/// Learn more about [NavigationBar] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=DVGYddFaLv0). /// /// Navigation bars offer a persistent and convenient way to switch between /// primary destinations in an app. @@ -250,7 +250,7 @@ class NavigationBar extends StatelessWidget { /// the [NavigationDestination] is focused, hovered, or pressed. final WidgetStateProperty? overlayColor; - //// The text style of the label. + /// The text style of the label. /// /// If null, [NavigationBarThemeData.labelTextStyle] is used. If that /// is also null, the default text style is [TextTheme.labelMedium] with diff --git a/packages/material_ui/lib/src/navigation_rail.dart b/packages/material_ui/lib/src/navigation_rail.dart index e7143969f14a..7dda2c4291e5 100644 --- a/packages/material_ui/lib/src/navigation_rail.dart +++ b/packages/material_ui/lib/src/navigation_rail.dart @@ -28,7 +28,7 @@ const double _kIndicatorHeight = 32; /// app to navigate between a small number of views, typically between three and /// five. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=y9xchtVTtqQ} +/// Learn more about [NavigationRail] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=y9xchtVTtqQ). /// /// The navigation rail is meant for layouts with wide viewports, such as a /// desktop web or tablet landscape layout. For smaller layouts, like mobile diff --git a/packages/material_ui/lib/src/progress_indicator.dart b/packages/material_ui/lib/src/progress_indicator.dart index 107d9ef40c26..b1e25183aab2 100644 --- a/packages/material_ui/lib/src/progress_indicator.dart +++ b/packages/material_ui/lib/src/progress_indicator.dart @@ -364,7 +364,7 @@ class _LinearProgressIndicatorPainter extends CustomPainter { /// A Material Design linear progress indicator, also known as a progress bar. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=O-rhXZLtpv0} +/// Learn more about [LinearProgressIndicator] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=O-rhXZLtpv0). /// /// A widget that shows progress along a line. There are two kinds of linear /// progress indicators: @@ -798,7 +798,7 @@ class _CircularProgressIndicatorPainter extends CustomPainter { /// A Material Design circular progress indicator, which spins to indicate that /// the application is busy. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=O-rhXZLtpv0} +/// Learn more about [CircularProgressIndicator] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=O-rhXZLtpv0). /// /// A widget that shows progress along a circle. There are two kinds of circular /// progress indicators: diff --git a/packages/material_ui/lib/src/range_slider.dart b/packages/material_ui/lib/src/range_slider.dart index 19cb3a008856..19cbff16ba8d 100644 --- a/packages/material_ui/lib/src/range_slider.dart +++ b/packages/material_ui/lib/src/range_slider.dart @@ -45,7 +45,7 @@ typedef PaintRangeValueIndicator = void Function(PaintingContext context, Offset /// /// Used to select a range from a range of values. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=ufb4gIPDmEs} +/// Learn more about [RangeSlider] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=ufb4gIPDmEs). /// /// /// diff --git a/packages/material_ui/lib/src/refresh_indicator.dart b/packages/material_ui/lib/src/refresh_indicator.dart index 16bc4f8d91aa..236e17916de3 100644 --- a/packages/material_ui/lib/src/refresh_indicator.dart +++ b/packages/material_ui/lib/src/refresh_indicator.dart @@ -76,7 +76,7 @@ enum _IndicatorType { material, adaptive, noSpinner } /// A widget that supports the Material "swipe to refresh" idiom. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=ORApMlzwMdM} +/// Learn more about [RefreshIndicator] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=ORApMlzwMdM). /// /// When the child's [Scrollable] descendant overscrolls, an animated circular /// progress indicator is faded into view. When the scroll ends, if the diff --git a/packages/material_ui/lib/src/reorderable_list.dart b/packages/material_ui/lib/src/reorderable_list.dart index 430de8a9d3c5..ba1bd1bc1664 100644 --- a/packages/material_ui/lib/src/reorderable_list.dart +++ b/packages/material_ui/lib/src/reorderable_list.dart @@ -20,7 +20,7 @@ import 'theme.dart'; /// A list whose items the user can interactively reorder by dragging. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=3fB1mxOsqJE} +/// Learn more about [ReorderableListView] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=3fB1mxOsqJE). /// /// This sample shows by dragging the user can reorder the items of the list. /// The [onReorderItem] parameter will be called when a child diff --git a/packages/material_ui/lib/src/scaffold.dart b/packages/material_ui/lib/src/scaffold.dart index ab437e4bfafb..168fc5b7ab9f 100644 --- a/packages/material_ui/lib/src/scaffold.dart +++ b/packages/material_ui/lib/src/scaffold.dart @@ -78,7 +78,7 @@ enum _ScaffoldSlot { /// Manages [SnackBar]s and [MaterialBanner]s for descendant [Scaffold]s. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=lytQi-slT5Y} +/// Learn more about [ScaffoldMessenger] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=lytQi-slT5Y). /// /// This class provides APIs for showing snack bars and material banners at the /// bottom and top of the screen, respectively. diff --git a/packages/material_ui/lib/src/scrollbar.dart b/packages/material_ui/lib/src/scrollbar.dart index e7e9ab1cb086..adc315e5c972 100644 --- a/packages/material_ui/lib/src/scrollbar.dart +++ b/packages/material_ui/lib/src/scrollbar.dart @@ -22,7 +22,7 @@ const Duration _kScrollbarTimeToFade = Duration(milliseconds: 600); /// To add a scrollbar to a [ScrollView], wrap the scroll view /// widget in a [Scrollbar] widget. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=DbkIQSvwnZc} +/// Learn more about [Scrollbar] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=DbkIQSvwnZc). /// /// {@macro flutter.widgets.Scrollbar} /// diff --git a/packages/material_ui/lib/src/selectable_text.dart b/packages/material_ui/lib/src/selectable_text.dart index 45693e19ad22..171b9b83547e 100644 --- a/packages/material_ui/lib/src/selectable_text.dart +++ b/packages/material_ui/lib/src/selectable_text.dart @@ -84,7 +84,7 @@ class _SelectableTextSelectionGestureDetectorBuilder extends TextSelectionGestur /// The string might break across multiple lines or might all be displayed on /// the same line depending on the layout constraints. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=ZSU3ZXOs6hc} +/// Learn more about [SelectableText] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=ZSU3ZXOs6hc). /// /// The [style] argument is optional. When omitted, the text will use the style /// from the closest enclosing [DefaultTextStyle]. If the given style's diff --git a/packages/material_ui/lib/src/slider.dart b/packages/material_ui/lib/src/slider.dart index c80231a5f301..f731c5a2b2e3 100644 --- a/packages/material_ui/lib/src/slider.dart +++ b/packages/material_ui/lib/src/slider.dart @@ -76,7 +76,7 @@ enum SliderInteraction { /// /// Used to select from a range of values. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=ufb4gIPDmEs} +/// Learn more about [Slider] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=ufb4gIPDmEs). /// /// /// diff --git a/packages/material_ui/lib/src/snack_bar.dart b/packages/material_ui/lib/src/snack_bar.dart index 88b2e0fa8dfe..9a7180d86c63 100644 --- a/packages/material_ui/lib/src/snack_bar.dart +++ b/packages/material_ui/lib/src/snack_bar.dart @@ -217,7 +217,7 @@ class _SnackBarActionState extends State { /// A lightweight message with an optional action which briefly displays at the /// bottom of the screen. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=zpO6n_oZWw0} +/// Learn more about [SnackBar] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=zpO6n_oZWw0). /// /// To display a snack bar, call `ScaffoldMessenger.of(context).showSnackBar()`, /// passing an instance of [SnackBar] that describes the message. diff --git a/packages/material_ui/lib/src/switch_list_tile.dart b/packages/material_ui/lib/src/switch_list_tile.dart index cf856b86d237..98796db3c7c6 100644 --- a/packages/material_ui/lib/src/switch_list_tile.dart +++ b/packages/material_ui/lib/src/switch_list_tile.dart @@ -31,7 +31,7 @@ enum _SwitchListTileType { material, adaptive } /// A [ListTile] with a [Switch]. In other words, a switch with a label. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=0igIjvtEWNU} +/// Learn more about [SwitchListTile] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=0igIjvtEWNU). /// /// The entire list tile is interactive: tapping anywhere in the tile toggles /// the switch. Tapping and dragging the [Switch] also triggers the [onChanged] diff --git a/packages/material_ui/lib/src/tab_controller.dart b/packages/material_ui/lib/src/tab_controller.dart index 8f691de5f748..8cd56d8fb18f 100644 --- a/packages/material_ui/lib/src/tab_controller.dart +++ b/packages/material_ui/lib/src/tab_controller.dart @@ -318,7 +318,7 @@ class _TabControllerScope extends InheritedWidget { /// The [TabController] for descendant widgets that don't specify one /// explicitly. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=POtoEH-5l40} +/// Learn more about [DefaultTabController] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=POtoEH-5l40). /// /// [DefaultTabController] is an inherited widget that is used to share a /// [TabController] with a [TabBar] or a [TabBarView]. It's used when sharing an diff --git a/packages/material_ui/lib/src/tabs.dart b/packages/material_ui/lib/src/tabs.dart index 4e446ac37506..8a0d0789c06d 100644 --- a/packages/material_ui/lib/src/tabs.dart +++ b/packages/material_ui/lib/src/tabs.dart @@ -939,7 +939,7 @@ typedef TabValueChanged = void Function(T value, int index); /// Typically created as the [AppBar.bottom] part of an [AppBar] and in /// conjunction with a [TabBarView]. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=POtoEH-5l40} +/// Learn more about [TabBar] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=POtoEH-5l40). /// /// If a [TabController] is not provided, then a [DefaultTabController] ancestor /// must be provided instead. The tab controller's [TabController.length] must @@ -2253,7 +2253,7 @@ class _TabBarState extends State { /// /// This widget is typically used in conjunction with a [TabBar]. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=POtoEH-5l40} +/// Learn more about [TabBarView] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=POtoEH-5l40). /// /// If a [TabController] is not provided, then there must be a [DefaultTabController] /// ancestor. @@ -2632,7 +2632,7 @@ class TabPageSelectorIndicator extends StatelessWidget { /// Uses [TabPageSelectorIndicator] to display a row of small circular /// indicators, one per tab. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=Q628ue9Cq7U} +/// Learn more about [TabPageSelector] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=Q628ue9Cq7U). /// /// The selected tab's indicator is highlighted. Often used in conjunction with /// a [TabBarView]. diff --git a/packages/material_ui/lib/src/theme.dart b/packages/material_ui/lib/src/theme.dart index b103f725904f..e322efd26178 100644 --- a/packages/material_ui/lib/src/theme.dart +++ b/packages/material_ui/lib/src/theme.dart @@ -23,7 +23,7 @@ const Duration kThemeAnimationDuration = Duration(milliseconds: 200); /// /// A theme describes the colors and typographic choices of an application. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=oTvQDJOBXmM} +/// Learn more about [Theme] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=oTvQDJOBXmM). /// /// Descendant widgets obtain the current theme's [ThemeData] object using /// [Theme.of]. When a widget uses [Theme.of], it is automatically rebuilt if diff --git a/packages/material_ui/lib/src/theme_data.dart b/packages/material_ui/lib/src/theme_data.dart index 9520dde92bf0..9835f202f047 100644 --- a/packages/material_ui/lib/src/theme_data.dart +++ b/packages/material_ui/lib/src/theme_data.dart @@ -121,7 +121,7 @@ class Adaptation { /// An interface that defines custom additions to a [ThemeData] object. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=8-szcYzFVao} +/// Learn more about [ThemeExtension] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=8-szcYzFVao). /// /// Typically used for custom colors. To use, subclass [ThemeExtension], /// define a number of fields (e.g. [Color]s), and implement the [copyWith] and diff --git a/packages/material_ui/lib/src/toggle_buttons.dart b/packages/material_ui/lib/src/toggle_buttons.dart index b4fa2db9597d..4ad23f3c03ec 100644 --- a/packages/material_ui/lib/src/toggle_buttons.dart +++ b/packages/material_ui/lib/src/toggle_buttons.dart @@ -39,7 +39,7 @@ import 'toggle_buttons_theme.dart'; /// that's preferred for applications that are configured for Material 3 /// (see [ThemeData.useMaterial3]). /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=kVEguaQWGAY} +/// Learn more about [ToggleButtons] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=kVEguaQWGAY). /// /// ## Updating to [SegmentedButton] /// diff --git a/packages/material_ui/lib/src/tooltip.dart b/packages/material_ui/lib/src/tooltip.dart index 5db7d55caea8..95aa81b930e0 100644 --- a/packages/material_ui/lib/src/tooltip.dart +++ b/packages/material_ui/lib/src/tooltip.dart @@ -35,7 +35,7 @@ import 'tooltip_visibility.dart'; /// representation of the widget, which, for example, can be vocalized by a /// screen reader. /// -/// {@youtube 560 315 https://www.youtube.com/watch?v=EeEfD5fI-5Q} +/// Learn more about [Tooltip] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=EeEfD5fI-5Q). /// /// /// diff --git a/script/l10n/bin/gen_localizations.dart b/script/l10n/bin/gen_localizations.dart index 40aeb93d7339..ec1426d6aea9 100644 --- a/script/l10n/bin/gen_localizations.dart +++ b/script/l10n/bin/gen_localizations.dart @@ -84,9 +84,7 @@ String generateArbBasedLocalizationSubclasses({ assert(supportedLanguagesDocMacro.isNotEmpty); generateConstructorForCountrySubClass ??= generateConstructor; final output = StringBuffer(); - output.writeln( - generateHeader('dart script/l10n/bin/gen_localizations.dart --overwrite'), - ); + output.writeln(generateHeader('dart script/l10n/bin/gen_localizations.dart --overwrite')); final supportedLocales = StringBuffer(); diff --git a/script/l10n/lib/gen_cupertino_localizations.dart b/script/l10n/lib/gen_cupertino_localizations.dart index 38f8d94d79e6..ed861d1027d3 100644 --- a/script/l10n/lib/gen_cupertino_localizations.dart +++ b/script/l10n/lib/gen_cupertino_localizations.dart @@ -14,6 +14,9 @@ String generateCupertinoHeader(String regenerateInstructions) { // To regenerate the file, use: // $regenerateInstructions +/// @docImport 'package:intl/intl.dart'; +library; + import 'dart:collection'; import 'package:flutter/widgets.dart'; diff --git a/script/l10n/lib/gen_material_localizations.dart b/script/l10n/lib/gen_material_localizations.dart index 1482dcfa6154..02a74eac09b3 100644 --- a/script/l10n/lib/gen_material_localizations.dart +++ b/script/l10n/lib/gen_material_localizations.dart @@ -14,6 +14,9 @@ String generateMaterialHeader(String regenerateInstructions) { // To regenerate the file, use: // $regenerateInstructions +/// @docImport 'package:intl/intl.dart'; +library; + import 'dart:collection'; import 'package:flutter/widgets.dart';