mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Add widget of the week video embeddings (#45362)
This commit is contained in:
parent
873e33c793
commit
cb35c88b34
@ -212,6 +212,8 @@ class DataCell {
|
||||
|
||||
/// A material design data table.
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=ktTajqbhIcY}
|
||||
///
|
||||
/// Displaying data in a table is expensive, because to lay out the
|
||||
/// table all the data must be measured twice, once to negotiate the
|
||||
/// dimensions to use for each column, and once to actually lay out
|
||||
|
@ -137,6 +137,8 @@ class Dialog extends StatelessWidget {
|
||||
/// 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}
|
||||
///
|
||||
/// If the content is too large to fit on the screen vertically, the dialog will
|
||||
/// display the title and the actions and let the content overflow, which is
|
||||
/// rarely desired. Consider using a scrolling widget for [content], such as
|
||||
|
@ -165,6 +165,8 @@ enum ListTileControlAffinity {
|
||||
/// 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}
|
||||
///
|
||||
/// 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
|
||||
/// tile are defined with the [leading] and [trailing] parameters. The first
|
||||
|
@ -52,6 +52,8 @@ typedef ReorderCallback = void Function(int oldIndex, int newIndex);
|
||||
/// those children that are actually visible.
|
||||
///
|
||||
/// All [children] must have a key.
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=3fB1mxOsqJE}
|
||||
class ReorderableListView extends StatefulWidget {
|
||||
|
||||
/// Creates a reorderable list.
|
||||
|
@ -131,6 +131,8 @@ 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}
|
||||
///
|
||||
/// The [style] argument is optional. When omitted, the text will use the style
|
||||
/// from the closest enclosing [DefaultTextStyle]. If the given style's
|
||||
/// [TextStyle.inherit] property is true (the default), the given style will
|
||||
|
@ -66,6 +66,8 @@ typedef AnimatedCrossFadeBuilder = Widget Function(Widget topChild, Key topChild
|
||||
/// A widget that cross-fades between two given children and animates itself
|
||||
/// between their sizes.
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=PGK2UUAyE54}
|
||||
///
|
||||
/// The animation is controlled through the [crossFadeState] parameter.
|
||||
/// [firstCurve] and [secondCurve] represent the opacity curves of the two
|
||||
/// children. The [firstCurve] is inverted, i.e. it fades out when providing a
|
||||
|
@ -66,6 +66,8 @@ typedef AnimatedSwitcherLayoutBuilder = Widget Function(Widget currentChild, Lis
|
||||
/// A widget that by default does a cross-fade between a new widget and the
|
||||
/// widget previously set on the [AnimatedSwitcher] as a child.
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=2W7POjFb88g}
|
||||
///
|
||||
/// If they are swapped fast enough (i.e. before [duration] elapses), more than
|
||||
/// one previous child can exist and be transitioning out while the newest one
|
||||
/// is transitioning in.
|
||||
|
@ -2122,6 +2122,8 @@ class SizedBox extends SingleChildRenderObjectWidget {
|
||||
/// pixels, you could use `const BoxConstraints(minHeight: 50.0)` as the
|
||||
/// [constraints].
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=o2KveVr7adg}
|
||||
///
|
||||
/// {@tool sample}
|
||||
///
|
||||
/// This snippet makes the child widget (a [Card] with some [Text]) fill the
|
||||
@ -2269,6 +2271,8 @@ class UnconstrainedBox extends SingleChildRenderObjectWidget {
|
||||
/// For more details about the layout algorithm, see
|
||||
/// [RenderFractionallySizedOverflowBox].
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=PEsY654EGZ0}
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [Align], which sizes itself based on its child's size and positions
|
||||
@ -2375,6 +2379,8 @@ class FractionallySizedBox extends SingleChildRenderObjectWidget {
|
||||
/// parents' size, so that they behave reasonably in lists (which are
|
||||
/// unbounded).
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=uVki2CIzBTs}
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [ConstrainedBox], which applies its constraints in all cases, not just
|
||||
@ -3064,6 +3070,8 @@ class ListBody extends MultiChildRenderObjectWidget {
|
||||
/// way, for example having some text and an image, overlaid with a gradient and
|
||||
/// a button attached to the bottom.
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=liEGSeD3Zt8}
|
||||
///
|
||||
/// Each child of a [Stack] widget is either _positioned_ or _non-positioned_.
|
||||
/// Positioned children are those wrapped in a [Positioned] widget that has at
|
||||
/// least one non-null property. The stack sizes itself to contain all the
|
||||
@ -3262,6 +3270,8 @@ class Stack extends MultiChildRenderObjectWidget {
|
||||
///
|
||||
/// If value is null, then nothing is displayed.
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=_O0PPD1Xfbk}
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [Stack], for more details about stacks.
|
||||
@ -4963,6 +4973,8 @@ class Flow extends MultiChildRenderObjectWidget {
|
||||
|
||||
/// A paragraph of rich text.
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=rykDVh-QFfw}
|
||||
///
|
||||
/// The [RichText] widget displays text that uses multiple different styles. The
|
||||
/// text to display is described using a tree of [TextSpan] objects, each of
|
||||
/// which has an associated style that is used for that subtree. The text might
|
||||
@ -6179,6 +6191,8 @@ class MetaData extends SingleChildRenderObjectWidget {
|
||||
/// Used by accessibility tools, search engines, and other semantic analysis
|
||||
/// software to determine the meaning of the application.
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=NvtMt_DtFrQ}
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [MergeSemantics], which marks a subtree as being a single node for
|
||||
|
@ -165,6 +165,8 @@ class DecoratedBox extends SingleChildRenderObjectWidget {
|
||||
/// A convenience widget that combines common painting, positioning, and sizing
|
||||
/// widgets.
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=c1xLMaTUWCY}
|
||||
///
|
||||
/// A container first surrounds the child with [padding] (inflated by any
|
||||
/// borders present in the [decoration]) and then applies additional
|
||||
/// [constraints] to the padded extent (incorporating the `width` and `height`
|
||||
|
@ -32,6 +32,8 @@ typedef ScrollableWidgetBuilder = Widget Function(
|
||||
/// A container for a [Scrollable] that responds to drag gestures by resizing
|
||||
/// the scrollable until a limit is reached, and then scrolling.
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=Hgw819mL_78}
|
||||
///
|
||||
/// This widget can be dragged along the vertical axis between its
|
||||
/// [minChildSize], which defaults to `0.25` and [maxChildSize], which defaults
|
||||
/// to `1.0`. These sizes are percentages of the height of the parent container.
|
||||
|
@ -779,6 +779,8 @@ class _AnimatedContainerState extends AnimatedWidgetBaseState<AnimatedContainer>
|
||||
/// Animated version of [Padding] which automatically transitions the
|
||||
/// indentation over a given duration whenever the given inset changes.
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=PY2m0fhGNz4}
|
||||
///
|
||||
/// Here's an illustration of what using this widget looks like, using a [curve]
|
||||
/// of [Curves.fastOutSlowIn].
|
||||
/// {@animation 250 266 https://flutter.github.io/assets-for-api-docs/assets/widgets/animated_padding.mp4}
|
||||
@ -942,6 +944,8 @@ class _AnimatedAlignState extends AnimatedWidgetBaseState<AnimatedAlign> {
|
||||
/// Animated version of [Positioned] which automatically transitions the child's
|
||||
/// position over a given duration whenever the given position changes.
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=hC3s2YdtWt8}
|
||||
///
|
||||
/// Only works if it's the child of a [Stack].
|
||||
///
|
||||
/// This widget is a good choice if the _size_ of the child would end up
|
||||
@ -1238,6 +1242,8 @@ class _AnimatedPositionedDirectionalState extends AnimatedWidgetBaseState<Animat
|
||||
/// Animated version of [Opacity] which automatically transitions the child's
|
||||
/// opacity over a given duration whenever the given opacity changes.
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=QZAvjqOqiLY}
|
||||
///
|
||||
/// Animating an opacity is relatively expensive because it requires painting
|
||||
/// the child into an intermediate buffer.
|
||||
///
|
||||
|
@ -49,6 +49,8 @@ class _PlaceholderPainter extends CustomPainter {
|
||||
/// By default, the placeholder is sized to fit its container. If the
|
||||
/// placeholder is in an unbounded space, it will size itself according to the
|
||||
/// given [fallbackWidth] and [fallbackHeight].
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=LPe56fezmoo}
|
||||
class Placeholder extends StatelessWidget {
|
||||
/// Creates a widget which draws a box.
|
||||
const Placeholder({
|
||||
|
@ -565,6 +565,8 @@ abstract class BoxScrollView extends ScrollView {
|
||||
|
||||
/// A scrollable list of widgets arranged linearly.
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=KJpkjHGiI5A}
|
||||
///
|
||||
/// [ListView] is the most commonly used scrolling widget. It displays its
|
||||
/// children one after another in the scroll direction. In the cross axis, the
|
||||
/// children are required to fill the [ListView].
|
||||
|
Loading…
Reference in New Issue
Block a user