forked from firka/flutter
Add widget of the week videos to documentation (#61368)
This commit is contained in:
@@ -77,6 +77,8 @@ const double _kDividerThickness = 1.0;
|
||||
|
||||
/// 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
|
||||
/// 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
|
||||
|
||||
@@ -20,6 +20,8 @@ const Color _kActiveTickColor = CupertinoDynamicColor.withBrightness(
|
||||
|
||||
/// An iOS-style activity indicator that spins clockwise.
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=AENVH-ZqKDQ}
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * <https://developer.apple.com/ios/human-interface-guidelines/controls/progress-indicators/#activity-indicators>
|
||||
|
||||
@@ -313,6 +313,8 @@ const double _textVerticalSeparation = 18.0;
|
||||
///
|
||||
/// 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
|
||||
/// process of showing an about dialog simpler.
|
||||
///
|
||||
|
||||
@@ -19,6 +19,8 @@ import 'theme_data.dart';
|
||||
/// The entire list tile is interactive: tapping anywhere in the tile toggles
|
||||
/// the checkbox.
|
||||
///
|
||||
/// {@youtube 560 315 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.
|
||||
///
|
||||
|
||||
@@ -21,6 +21,8 @@ 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}
|
||||
///
|
||||
/// The box's total height is controlled by [height]. The appropriate
|
||||
/// padding is automatically computed from the height.
|
||||
///
|
||||
|
||||
@@ -51,6 +51,8 @@ const Duration _kBaseSettleDuration = Duration(milliseconds: 246);
|
||||
/// A material design panel that slides in horizontally from the edge of a
|
||||
/// [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
|
||||
/// the drawer is usually a [ListView] whose first child is a [DrawerHeader]
|
||||
/// that displays status information about the current user. The remaining
|
||||
|
||||
@@ -206,6 +206,8 @@ 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}
|
||||
///
|
||||
/// A widget that shows progress along a line. There are two kinds of linear
|
||||
/// progress indicators:
|
||||
///
|
||||
@@ -397,6 +399,8 @@ 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}
|
||||
///
|
||||
/// A widget that shows progress along a circle. There are two kinds of circular
|
||||
/// progress indicators:
|
||||
///
|
||||
|
||||
@@ -143,6 +143,8 @@ class _SnackBarActionState extends State<SnackBarAction> {
|
||||
/// 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}
|
||||
///
|
||||
/// To display a snack bar, call `Scaffold.of(context).showSnackBar()`, passing
|
||||
/// an instance of [SnackBar] that describes the message.
|
||||
///
|
||||
|
||||
@@ -316,6 +316,8 @@ 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}
|
||||
///
|
||||
/// [DefaultTabController] is an inherited widget that is used to share a
|
||||
/// [TabController] with a [TabBar] or a [TabBarView]. It's used when sharing an
|
||||
/// explicitly created [TabController] isn't convenient because the tab bar
|
||||
|
||||
@@ -568,6 +568,8 @@ class _TabBarScrollController extends ScrollController {
|
||||
/// 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}
|
||||
///
|
||||
/// If a [TabController] is not provided, then a [DefaultTabController] ancestor
|
||||
/// must be provided instead. The tab controller's [TabController.length] must
|
||||
/// equal the length of the [tabs] list and the length of the
|
||||
@@ -1144,6 +1146,8 @@ class _TabBarState extends State<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]
|
||||
/// ancestor.
|
||||
///
|
||||
|
||||
@@ -25,6 +25,8 @@ import 'toggle_buttons_theme.dart';
|
||||
/// correlated by their index in the list. The length of [isSelected] has to
|
||||
/// match the length of the [children] list.
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=kVEguaQWGAY}
|
||||
///
|
||||
/// ## Customizing toggle buttons
|
||||
/// Each toggle's behavior can be configured by the [onPressed] callback, which
|
||||
/// can update the [isSelected] list however it wants to.
|
||||
|
||||
@@ -269,6 +269,8 @@ class Opacity extends SingleChildRenderObjectWidget {
|
||||
/// For example, [ShaderMask] can be used to gradually fade out the edge
|
||||
/// of a child by using a [new ui.Gradient.linear] mask.
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=7sUL66pTQ7Q}
|
||||
///
|
||||
/// {@tool snippet}
|
||||
///
|
||||
/// This example makes the text look like it is on fire:
|
||||
@@ -706,6 +708,8 @@ class ClipRRect extends SingleChildRenderObjectWidget {
|
||||
|
||||
/// 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
|
||||
/// prevents its child from painting outside that oval, but the size and
|
||||
/// location of the clip oval can be customized using a custom [clipper].
|
||||
@@ -775,6 +779,8 @@ class ClipOval extends SingleChildRenderObjectWidget {
|
||||
/// painted. The callback returns a path and the widget prevents the
|
||||
/// 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
|
||||
/// optimized widgets:
|
||||
///
|
||||
@@ -1576,6 +1582,8 @@ class RotatedBox extends SingleChildRenderObjectWidget {
|
||||
|
||||
/// 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
|
||||
/// 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
|
||||
@@ -6371,6 +6379,8 @@ class RepaintBoundary extends SingleChildRenderObjectWidget {
|
||||
|
||||
/// 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
|
||||
/// 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
|
||||
@@ -7092,6 +7102,8 @@ class KeyedSubtree extends StatelessWidget {
|
||||
|
||||
/// A platonic widget that calls a closure to obtain its child widget.
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=xXNOkIuSYuA}
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [StatefulBuilder], a platonic widget which also has state.
|
||||
|
||||
@@ -233,6 +233,8 @@ typedef ImageErrorWidgetBuilder = Widget Function(
|
||||
|
||||
/// 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
|
||||
/// specified:
|
||||
///
|
||||
|
||||
@@ -559,6 +559,8 @@ class FixedExtentScrollPhysics extends ScrollPhysics {
|
||||
/// This widget is similar to a [ListView] but with the restriction that all
|
||||
/// 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
|
||||
/// 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
|
||||
|
||||
@@ -88,6 +88,8 @@ abstract class Notification {
|
||||
|
||||
/// 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
|
||||
/// [runtimeType] is a subtype of `T`.
|
||||
///
|
||||
|
||||
@@ -18,6 +18,8 @@ export 'package:flutter/rendering.dart' show RelativeRect;
|
||||
|
||||
/// 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
|
||||
/// [Listenable], but it can be used with any [Listenable], including
|
||||
/// [ChangeNotifier] and [ValueNotifier].
|
||||
|
||||
@@ -13,6 +13,8 @@ import 'value_listenable_builder.dart';
|
||||
/// [Widget] builder that animates a property of a [Widget] to a target value
|
||||
/// 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
|
||||
/// defined via the type of the provided [tween] (e.g. [ColorTween],
|
||||
/// [RectTween], [Tween<double>], etc.).
|
||||
|
||||
Reference in New Issue
Block a user