diff --git a/packages/flutter/lib/src/material/app_bar.dart b/packages/flutter/lib/src/material/app_bar.dart index 31956c1dea..d4d9c3e23f 100644 --- a/packages/flutter/lib/src/material/app_bar.dart +++ b/packages/flutter/lib/src/material/app_bar.dart @@ -172,6 +172,12 @@ class _ToolbarContainerLayout extends SingleChildLayoutDelegate { /// * [FlexibleSpaceBar], which is used with [flexibleSpace] when the app bar /// can expand and collapse. /// * +/// * Cookbook: [Place a floating app bar above a list](https://flutter.dev/docs/cookbook/lists/floating-app-bar) +/// * See our +/// [AppBar Basics sample](https://flutter.dev/docs/catalog/samples/basic-app-bar) +/// and our advanced samples with app bars with +/// [tabs](https://flutter.dev/docs/catalog/samples/tabbed-app-bar) or +/// [custom bottom widgets](https://flutter.dev/docs/catalog/samples/app-bar-bottom). class AppBar extends StatefulWidget implements PreferredSizeWidget { /// Creates a material design app bar. /// diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index 46510ac881..1e3d14e532 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -193,6 +193,10 @@ class MaterialAccentColor extends ColorSwatch { /// /// The [Colors.transparent] color isn't shown here because it is entirely /// invisible! +/// +/// See also: +/// +/// * Cookbook: [Use themes to share colors and font styles](https://flutter.dev/docs/cookbook/design/themes) class Colors { // This class is not meant to be instantiated or extended; this constructor // prevents instantiation and extension. diff --git a/packages/flutter/lib/src/material/flat_button.dart b/packages/flutter/lib/src/material/flat_button.dart index 9d06907f5c..f3cfc91057 100644 --- a/packages/flutter/lib/src/material/flat_button.dart +++ b/packages/flutter/lib/src/material/flat_button.dart @@ -98,6 +98,7 @@ import 'theme_data.dart'; /// * [InkWell], which implements the ink splash part of a flat button. /// * [RawMaterialButton], the widget this widget is based on. /// * +/// * Cookbook: [Build a form with validation](https://flutter.dev/docs/cookbook/forms/validation) class FlatButton extends MaterialButton { /// Create a simple text button. /// diff --git a/packages/flutter/lib/src/material/list_tile.dart b/packages/flutter/lib/src/material/list_tile.dart index 3f0bd3aaac..97929f9f09 100644 --- a/packages/flutter/lib/src/material/list_tile.dart +++ b/packages/flutter/lib/src/material/list_tile.dart @@ -654,6 +654,8 @@ enum ListTileControlAffinity { /// * [CheckboxListTile], [RadioListTile], and [SwitchListTile], widgets /// that combine [ListTile] with other controls. /// * +/// * Cookbook: [Use lists](https://flutter.dev/docs/cookbook/lists/basic-list) +/// * Cookbook: [Implement swipe to dismiss](https://flutter.dev/docs/cookbook/gestures/dismissible) class ListTile extends StatelessWidget { /// Creates a list tile. /// diff --git a/packages/flutter/lib/src/material/raised_button.dart b/packages/flutter/lib/src/material/raised_button.dart index 64f6e8030b..08a0759257 100644 --- a/packages/flutter/lib/src/material/raised_button.dart +++ b/packages/flutter/lib/src/material/raised_button.dart @@ -101,6 +101,7 @@ import 'theme_data.dart'; /// * [InkWell], which implements the ink splash part of a flat button. /// * [RawMaterialButton], the widget this widget is based on. /// * +/// * Cookbook: [Build a form with validation](https://flutter.dev/docs/cookbook/forms/validation) class RaisedButton extends MaterialButton { /// Create a filled button. /// diff --git a/packages/flutter/lib/src/material/scaffold.dart b/packages/flutter/lib/src/material/scaffold.dart index dd6952aff4..eaf757f5fb 100644 --- a/packages/flutter/lib/src/material/scaffold.dart +++ b/packages/flutter/lib/src/material/scaffold.dart @@ -1006,6 +1006,10 @@ class _FloatingActionButtonTransitionState extends State<_FloatingActionButtonTr /// it is shown using the [showModalBottomSheet] function. /// * [ScaffoldState], which is the state associated with this widget. /// * +/// * Cookbook: [Add a Drawer to a screen](https://flutter.dev/docs/cookbook/design/drawer) +/// * Cookbook: [Display a snackbar](https://flutter.dev/docs/cookbook/design/snackbars) +/// * See our +/// [Scaffold Sample Apps](https://flutter.dev/docs/catalog/samples/Scaffold). class Scaffold extends StatefulWidget { /// Creates a visual scaffold for material design widgets. const Scaffold({ diff --git a/packages/flutter/lib/src/material/text_field.dart b/packages/flutter/lib/src/material/text_field.dart index 1702fff855..e3f338bf5c 100644 --- a/packages/flutter/lib/src/material/text_field.dart +++ b/packages/flutter/lib/src/material/text_field.dart @@ -261,7 +261,6 @@ class _TextFieldSelectionGestureDetectorBuilder extends TextSelectionGestureDete /// /// See also: /// -/// * /// * [TextFormField], which integrates with the [Form] widget. /// * [InputDecorator], which shows the labels and other visual elements that /// surround the actual text editing widget. @@ -269,8 +268,11 @@ class _TextFieldSelectionGestureDetectorBuilder extends TextSelectionGestureDete /// [TextField]. The [EditableText] widget is rarely used directly unless /// you are implementing an entirely different design language, such as /// Cupertino. -/// * Learn how to use a [TextEditingController] in one of our -/// [cookbook recipe](https://flutter.dev/docs/cookbook/forms/text-field-changes#2-use-a-texteditingcontroller)s. +/// * +/// * Cookbook: [Create and style a text field](https://flutter.dev/docs/cookbook/forms/text-input) +/// * Cookbook: [Handle changes to a text field](https://flutter.dev/docs/cookbook/forms/text-field-changes) +/// * Cookbook: [Retrieve the value of a text field](https://flutter.dev/docs/cookbook/forms/retrieve-input) +/// * Cookbook: [Focus and text fields](https://flutter.dev/docs/cookbook/forms/focus) class TextField extends StatefulWidget { /// Creates a Material Design text field. /// diff --git a/packages/flutter/lib/src/painting/text_style.dart b/packages/flutter/lib/src/painting/text_style.dart index c812fb33a1..9efe6fb944 100644 --- a/packages/flutter/lib/src/painting/text_style.dart +++ b/packages/flutter/lib/src/painting/text_style.dart @@ -391,7 +391,8 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a /// * [TextSpan], the class that wraps a [TextStyle] for the purposes of /// passing it to a [RichText]. /// * [TextStyle](https://api.flutter.dev/flutter/dart-ui/TextStyle-class.html), the class in the [dart:ui] library. -/// +/// * Cookbook: [Use a custom font](https://flutter.dev/docs/cookbook/design/fonts) +/// * Cookbook: [Use themes to share colors and font styles](https://flutter.dev/docs/cookbook/design/themes) @immutable class TextStyle with Diagnosticable { /// Creates a text style. diff --git a/packages/flutter/lib/src/widgets/container.dart b/packages/flutter/lib/src/widgets/container.dart index 683ad47728..e328c3d930 100644 --- a/packages/flutter/lib/src/widgets/container.dart +++ b/packages/flutter/lib/src/widgets/container.dart @@ -251,6 +251,7 @@ class DecoratedBox extends SingleChildRenderObjectWidget { /// * [Border], which has a sample which uses [Container] heavily. /// * [Ink], which paints a [Decoration] on a [Material], allowing /// [InkResponse] and [InkWell] splashes to paint over them. +/// * Cookbook: [Animate the properties of a container](https://flutter.dev/docs/cookbook/animation/animated-container) /// * The [catalog of layout widgets](https://flutter.dev/widgets/layout/). class Container extends StatelessWidget { /// Creates a widget that combines common painting, positioning, and sizing widgets. diff --git a/packages/flutter/lib/src/widgets/image.dart b/packages/flutter/lib/src/widgets/image.dart index f4db8f7a01..39a14a222d 100644 --- a/packages/flutter/lib/src/widgets/image.dart +++ b/packages/flutter/lib/src/widgets/image.dart @@ -297,7 +297,9 @@ typedef ImageErrorWidgetBuilder = Widget Function( /// material application (especially if the image is in a [Material] and will /// have an [InkWell] on top of it). /// * [Image](dart-ui/Image-class.html), the class in the [dart:ui] library. -/// +/// * Cookbook: [Display images from the internet](https://flutter.dev/docs/cookbook/images/network-image) +/// * Cookbook: [Work with cached images](https://flutter.dev/docs/cookbook/images/cached-images) +/// * Cookbook: [Fade in images with a placeholder](https://flutter.dev/docs/cookbook/images/fading-in-images) class Image extends StatefulWidget { /// Creates a widget that displays an image. /// diff --git a/packages/flutter/lib/src/widgets/scroll_view.dart b/packages/flutter/lib/src/widgets/scroll_view.dart index 408ba4fd2e..2fd269c704 100644 --- a/packages/flutter/lib/src/widgets/scroll_view.dart +++ b/packages/flutter/lib/src/widgets/scroll_view.dart @@ -992,7 +992,7 @@ abstract class BoxScrollView extends ScrollView { /// child. /// * [PageView], which is a scrolling list of child widgets that are each the /// size of the viewport. -/// * [GridView], which is scrollable, 2D array of widgets. +/// * [GridView], which is a scrollable, 2D array of widgets. /// * [CustomScrollView], which is a scrollable widget that creates custom /// scroll effects using slivers. /// * [ListBody], which arranges its children in a similar manner, but without @@ -1000,6 +1000,11 @@ abstract class BoxScrollView extends ScrollView { /// * [ScrollNotification] and [NotificationListener], which can be used to watch /// the scroll position without using a [ScrollController]. /// * The [catalog of layout widgets](https://flutter.dev/widgets/layout/). +/// * Cookbook: [Use lists](https://flutter.dev/docs/cookbook/lists/basic-list) +/// * Cookbook: [Work with long lists](https://flutter.dev/docs/cookbook/lists/long-lists) +/// * Cookbook: [Create a horizontal list](https://flutter.dev/docs/cookbook/lists/horizontal-list) +/// * Cookbook: [Create lists with different types of items](https://flutter.dev/docs/cookbook/lists/mixed-list) +/// * Cookbook: [Implement swipe to dismiss](https://flutter.dev/docs/cookbook/gestures/dismissible) class ListView extends BoxScrollView { /// Creates a scrollable, linear array of widgets from an explicit [List]. ///