Unverified Commit b635d976 authored by Todd Volkert's avatar Todd Volkert Committed by GitHub

Add widget of the week videos to documentation (#61368)

parent e2acc650
...@@ -77,6 +77,8 @@ const double _kDividerThickness = 1.0; ...@@ -77,6 +77,8 @@ const double _kDividerThickness = 1.0;
/// An iOS-style action sheet. /// An iOS-style action sheet.
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=U-ao8p4A82k}
///
/// An action sheet is a specific style of alert that presents the user /// 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. /// with a set of two or more choices related to the current context.
/// An action sheet can have a title, an additional message, and a list /// An action sheet can have a title, an additional message, and a list
......
...@@ -20,6 +20,8 @@ const Color _kActiveTickColor = CupertinoDynamicColor.withBrightness( ...@@ -20,6 +20,8 @@ const Color _kActiveTickColor = CupertinoDynamicColor.withBrightness(
/// An iOS-style activity indicator that spins clockwise. /// An iOS-style activity indicator that spins clockwise.
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=AENVH-ZqKDQ}
///
/// See also: /// See also:
/// ///
/// * <https://developer.apple.com/ios/human-interface-guidelines/controls/progress-indicators/#activity-indicators> /// * <https://developer.apple.com/ios/human-interface-guidelines/controls/progress-indicators/#activity-indicators>
......
...@@ -313,6 +313,8 @@ const double _textVerticalSeparation = 18.0; ...@@ -313,6 +313,8 @@ const double _textVerticalSeparation = 18.0;
/// ///
/// To show an [AboutDialog], use [showAboutDialog]. /// To show an [AboutDialog], use [showAboutDialog].
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=YFCSODyFxbE}
///
/// If the application has a [Drawer], the [AboutListTile] widget can make the /// If the application has a [Drawer], the [AboutListTile] widget can make the
/// process of showing an about dialog simpler. /// process of showing an about dialog simpler.
/// ///
......
...@@ -19,6 +19,8 @@ import 'theme_data.dart'; ...@@ -19,6 +19,8 @@ import 'theme_data.dart';
/// The entire list tile is interactive: tapping anywhere in the tile toggles /// The entire list tile is interactive: tapping anywhere in the tile toggles
/// the checkbox. /// the checkbox.
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=RkSqPAn9szs}
///
/// The [value], [onChanged], [activeColor] and [checkColor] properties of this widget are /// The [value], [onChanged], [activeColor] and [checkColor] properties of this widget are
/// identical to the similarly-named properties on the [Checkbox] widget. /// identical to the similarly-named properties on the [Checkbox] widget.
/// ///
......
...@@ -21,6 +21,8 @@ import 'theme.dart'; ...@@ -21,6 +21,8 @@ import 'theme.dart';
/// To create a divider between [ListTile] items, consider using /// To create a divider between [ListTile] items, consider using
/// [ListTile.divideTiles], which is optimized for this case. /// [ListTile.divideTiles], which is optimized for this case.
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=_liUC641Nmk}
///
/// The box's total height is controlled by [height]. The appropriate /// The box's total height is controlled by [height]. The appropriate
/// padding is automatically computed from the height. /// padding is automatically computed from the height.
/// ///
......
...@@ -51,6 +51,8 @@ const Duration _kBaseSettleDuration = Duration(milliseconds: 246); ...@@ -51,6 +51,8 @@ const Duration _kBaseSettleDuration = Duration(milliseconds: 246);
/// A material design panel that slides in horizontally from the edge of a /// A material design panel that slides in horizontally from the edge of a
/// [Scaffold] to show navigation links in an application. /// [Scaffold] to show navigation links in an application.
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=WRj86iHihgY}
///
/// Drawers are typically used with the [Scaffold.drawer] property. The child of /// Drawers are typically used with the [Scaffold.drawer] property. The child of
/// the drawer is usually a [ListView] whose first child is a [DrawerHeader] /// the drawer is usually a [ListView] whose first child is a [DrawerHeader]
/// that displays status information about the current user. The remaining /// that displays status information about the current user. The remaining
......
...@@ -206,6 +206,8 @@ class _LinearProgressIndicatorPainter extends CustomPainter { ...@@ -206,6 +206,8 @@ class _LinearProgressIndicatorPainter extends CustomPainter {
/// A material design linear progress indicator, also known as a progress bar. /// A material design linear progress indicator, also known as a progress bar.
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=O-rhXZLtpv0}
///
/// A widget that shows progress along a line. There are two kinds of linear /// A widget that shows progress along a line. There are two kinds of linear
/// progress indicators: /// progress indicators:
/// ///
...@@ -397,6 +399,8 @@ class _CircularProgressIndicatorPainter extends CustomPainter { ...@@ -397,6 +399,8 @@ class _CircularProgressIndicatorPainter extends CustomPainter {
/// A material design circular progress indicator, which spins to indicate that /// A material design circular progress indicator, which spins to indicate that
/// the application is busy. /// the application is busy.
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=O-rhXZLtpv0}
///
/// A widget that shows progress along a circle. There are two kinds of circular /// A widget that shows progress along a circle. There are two kinds of circular
/// progress indicators: /// progress indicators:
/// ///
......
...@@ -143,6 +143,8 @@ class _SnackBarActionState extends State<SnackBarAction> { ...@@ -143,6 +143,8 @@ class _SnackBarActionState extends State<SnackBarAction> {
/// A lightweight message with an optional action which briefly displays at the /// A lightweight message with an optional action which briefly displays at the
/// bottom of the screen. /// bottom of the screen.
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=zpO6n_oZWw0}
///
/// To display a snack bar, call `Scaffold.of(context).showSnackBar()`, passing /// To display a snack bar, call `Scaffold.of(context).showSnackBar()`, passing
/// an instance of [SnackBar] that describes the message. /// an instance of [SnackBar] that describes the message.
/// ///
......
...@@ -316,6 +316,8 @@ class _TabControllerScope extends InheritedWidget { ...@@ -316,6 +316,8 @@ class _TabControllerScope extends InheritedWidget {
/// The [TabController] for descendant widgets that don't specify one /// The [TabController] for descendant widgets that don't specify one
/// explicitly. /// explicitly.
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=POtoEH-5l40}
///
/// [DefaultTabController] is an inherited widget that is used to share a /// [DefaultTabController] is an inherited widget that is used to share a
/// [TabController] with a [TabBar] or a [TabBarView]. It's used when sharing an /// [TabController] with a [TabBar] or a [TabBarView]. It's used when sharing an
/// explicitly created [TabController] isn't convenient because the tab bar /// explicitly created [TabController] isn't convenient because the tab bar
......
...@@ -568,6 +568,8 @@ class _TabBarScrollController extends ScrollController { ...@@ -568,6 +568,8 @@ class _TabBarScrollController extends ScrollController {
/// Typically created as the [AppBar.bottom] part of an [AppBar] and in /// Typically created as the [AppBar.bottom] part of an [AppBar] and in
/// conjunction with a [TabBarView]. /// conjunction with a [TabBarView].
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=POtoEH-5l40}
///
/// If a [TabController] is not provided, then a [DefaultTabController] ancestor /// If a [TabController] is not provided, then a [DefaultTabController] ancestor
/// must be provided instead. The tab controller's [TabController.length] must /// must be provided instead. The tab controller's [TabController.length] must
/// equal the length of the [tabs] list and the length of the /// equal the length of the [tabs] list and the length of the
...@@ -1144,6 +1146,8 @@ class _TabBarState extends State<TabBar> { ...@@ -1144,6 +1146,8 @@ class _TabBarState extends State<TabBar> {
/// ///
/// This widget is typically used in conjunction with a [TabBar]. /// This widget is typically used in conjunction with a [TabBar].
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=POtoEH-5l40}
///
/// If a [TabController] is not provided, then there must be a [DefaultTabController] /// If a [TabController] is not provided, then there must be a [DefaultTabController]
/// ancestor. /// ancestor.
/// ///
......
...@@ -25,6 +25,8 @@ import 'toggle_buttons_theme.dart'; ...@@ -25,6 +25,8 @@ import 'toggle_buttons_theme.dart';
/// correlated by their index in the list. The length of [isSelected] has to /// correlated by their index in the list. The length of [isSelected] has to
/// match the length of the [children] list. /// match the length of the [children] list.
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=kVEguaQWGAY}
///
/// ## Customizing toggle buttons /// ## Customizing toggle buttons
/// Each toggle's behavior can be configured by the [onPressed] callback, which /// Each toggle's behavior can be configured by the [onPressed] callback, which
/// can update the [isSelected] list however it wants to. /// can update the [isSelected] list however it wants to.
......
...@@ -269,6 +269,8 @@ class Opacity extends SingleChildRenderObjectWidget { ...@@ -269,6 +269,8 @@ class Opacity extends SingleChildRenderObjectWidget {
/// For example, [ShaderMask] can be used to gradually fade out the edge /// For example, [ShaderMask] can be used to gradually fade out the edge
/// of a child by using a [new ui.Gradient.linear] mask. /// of a child by using a [new ui.Gradient.linear] mask.
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=7sUL66pTQ7Q}
///
/// {@tool snippet} /// {@tool snippet}
/// ///
/// This example makes the text look like it is on fire: /// This example makes the text look like it is on fire:
...@@ -706,6 +708,8 @@ class ClipRRect extends SingleChildRenderObjectWidget { ...@@ -706,6 +708,8 @@ class ClipRRect extends SingleChildRenderObjectWidget {
/// A widget that clips its child using an oval. /// A widget that clips its child using an oval.
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=vzWWDO6whIM}
///
/// By default, inscribes an axis-aligned oval into its layout dimensions and /// By default, inscribes an axis-aligned oval into its layout dimensions and
/// prevents its child from painting outside that oval, but the size and /// prevents its child from painting outside that oval, but the size and
/// location of the clip oval can be customized using a custom [clipper]. /// location of the clip oval can be customized using a custom [clipper].
...@@ -775,6 +779,8 @@ class ClipOval extends SingleChildRenderObjectWidget { ...@@ -775,6 +779,8 @@ class ClipOval extends SingleChildRenderObjectWidget {
/// painted. The callback returns a path and the widget prevents the /// painted. The callback returns a path and the widget prevents the
/// child from painting outside the path. /// child from painting outside the path.
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=oAUebVIb-7s}
///
/// Clipping to a path is expensive. Certain shapes have more /// Clipping to a path is expensive. Certain shapes have more
/// optimized widgets: /// optimized widgets:
/// ///
...@@ -1576,6 +1582,8 @@ class RotatedBox extends SingleChildRenderObjectWidget { ...@@ -1576,6 +1582,8 @@ class RotatedBox extends SingleChildRenderObjectWidget {
/// A widget that insets its child by the given padding. /// A widget that insets its child by the given padding.
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=oD5RtLhhubg}
///
/// When passing layout constraints to its child, padding shrinks the /// When passing layout constraints to its child, padding shrinks the
/// constraints by the given padding, causing the child to layout at a smaller /// constraints by the given padding, causing the child to layout at a smaller
/// size. Padding then sizes itself to its child's size, inflated by the /// size. Padding then sizes itself to its child's size, inflated by the
...@@ -6371,6 +6379,8 @@ class RepaintBoundary extends SingleChildRenderObjectWidget { ...@@ -6371,6 +6379,8 @@ class RepaintBoundary extends SingleChildRenderObjectWidget {
/// A widget that is invisible during hit testing. /// A widget that is invisible during hit testing.
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=qV9pqHWxYgI}
///
/// When [ignoring] is true, this widget (and its subtree) is invisible /// When [ignoring] is true, this widget (and its subtree) is invisible
/// to hit testing. It still consumes space during layout and paints its child /// to hit testing. It still consumes space during layout and paints its child
/// as usual. It just cannot be the target of located events, because it returns /// as usual. It just cannot be the target of located events, because it returns
...@@ -7092,6 +7102,8 @@ class KeyedSubtree extends StatelessWidget { ...@@ -7092,6 +7102,8 @@ class KeyedSubtree extends StatelessWidget {
/// A platonic widget that calls a closure to obtain its child widget. /// A platonic widget that calls a closure to obtain its child widget.
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=xXNOkIuSYuA}
///
/// See also: /// See also:
/// ///
/// * [StatefulBuilder], a platonic widget which also has state. /// * [StatefulBuilder], a platonic widget which also has state.
......
...@@ -233,6 +233,8 @@ typedef ImageErrorWidgetBuilder = Widget Function( ...@@ -233,6 +233,8 @@ typedef ImageErrorWidgetBuilder = Widget Function(
/// A widget that displays an image. /// A widget that displays an image.
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=7oIAs-0G4mw}
///
/// Several constructors are provided for the various ways that an image can be /// Several constructors are provided for the various ways that an image can be
/// specified: /// specified:
/// ///
......
...@@ -559,6 +559,8 @@ class FixedExtentScrollPhysics extends ScrollPhysics { ...@@ -559,6 +559,8 @@ class FixedExtentScrollPhysics extends ScrollPhysics {
/// This widget is similar to a [ListView] but with the restriction that all /// This widget is similar to a [ListView] but with the restriction that all
/// children must be the same size along the scrolling axis. /// children must be the same size along the scrolling axis.
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=dUhmWAz4C7Y}
///
/// When the list is at the zero scroll offset, the first child is aligned with /// When the list is at the zero scroll offset, the first child is aligned with
/// the middle of the viewport. When the list is at the final scroll offset, /// the middle of the viewport. When the list is at the final scroll offset,
/// the last child is aligned with the middle of the viewport /// the last child is aligned with the middle of the viewport
......
...@@ -88,6 +88,8 @@ abstract class Notification { ...@@ -88,6 +88,8 @@ abstract class Notification {
/// A widget that listens for [Notification]s bubbling up the tree. /// A widget that listens for [Notification]s bubbling up the tree.
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=cAnFbFoGM50}
///
/// Notifications will trigger the [onNotification] callback only if their /// Notifications will trigger the [onNotification] callback only if their
/// [runtimeType] is a subtype of `T`. /// [runtimeType] is a subtype of `T`.
/// ///
......
...@@ -18,6 +18,8 @@ export 'package:flutter/rendering.dart' show RelativeRect; ...@@ -18,6 +18,8 @@ export 'package:flutter/rendering.dart' show RelativeRect;
/// A widget that rebuilds when the given [Listenable] changes value. /// A widget that rebuilds when the given [Listenable] changes value.
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=LKKgYpC-EPQ}
///
/// [AnimatedWidget] is most commonly used with [Animation] objects, which are /// [AnimatedWidget] is most commonly used with [Animation] objects, which are
/// [Listenable], but it can be used with any [Listenable], including /// [Listenable], but it can be used with any [Listenable], including
/// [ChangeNotifier] and [ValueNotifier]. /// [ChangeNotifier] and [ValueNotifier].
......
...@@ -13,6 +13,8 @@ import 'value_listenable_builder.dart'; ...@@ -13,6 +13,8 @@ import 'value_listenable_builder.dart';
/// [Widget] builder that animates a property of a [Widget] to a target value /// [Widget] builder that animates a property of a [Widget] to a target value
/// whenever the target value changes. /// whenever the target value changes.
/// ///
/// {@youtube 560 315 https://www.youtube.com/watch?v=l9uHB8VXZOg}
///
/// The type of the animated property ([Color], [Rect], [double], etc.) is /// The type of the animated property ([Color], [Rect], [double], etc.) is
/// defined via the type of the provided [tween] (e.g. [ColorTween], /// defined via the type of the provided [tween] (e.g. [ColorTween],
/// [RectTween], [Tween<double>], etc.). /// [RectTween], [Tween<double>], etc.).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment