diff --git a/packages/flutter/lib/src/material/tooltip.dart b/packages/flutter/lib/src/material/tooltip.dart index 9afe971420..db73084885 100644 --- a/packages/flutter/lib/src/material/tooltip.dart +++ b/packages/flutter/lib/src/material/tooltip.dart @@ -34,13 +34,14 @@ import 'tooltip_theme.dart'; /// /// This example show a basic [Tooltip] which has a [Text] as child. /// [message] contains your label to be shown by the tooltip when -/// the child that Tooltip wraps is long pressed. +/// the child that Tooltip wraps is hovered over on web or desktop. On mobile, +/// the tooltip is shown when the widget is long pressed. /// /// ```dart /// Widget build(BuildContext context) { /// return Tooltip( /// message: "I am a Tooltip", -/// child: Text("Tap this text and hold down to show a tooltip."), +/// child: Text("Hover over the text to show a tooltip."), /// ); /// } /// ``` diff --git a/packages/flutter/lib/src/widgets/basic.dart b/packages/flutter/lib/src/widgets/basic.dart index 840d38dd8a..5add0444e9 100644 --- a/packages/flutter/lib/src/widgets/basic.dart +++ b/packages/flutter/lib/src/widgets/basic.dart @@ -1474,7 +1474,7 @@ class CompositedTransformFollower extends SingleChildRenderObjectWidget { /// /// {@youtube 560 315 https://www.youtube.com/watch?v=T4Uehk3_wlY} /// -/// {@tool sample --template=stateless_widget_scaffold_center} +/// {@tool dartpad --template=stateless_widget_scaffold_center} /// /// In this example, the image is stretched to fill the entire [Container], which would /// not happen normally without using FittedBox. diff --git a/packages/flutter/lib/src/widgets/dismissible.dart b/packages/flutter/lib/src/widgets/dismissible.dart index 861c642acf..ef1d9eee66 100644 --- a/packages/flutter/lib/src/widgets/dismissible.dart +++ b/packages/flutter/lib/src/widgets/dismissible.dart @@ -68,7 +68,8 @@ enum DismissDirection { /// {@tool dartpad --template=stateful_widget_scaffold} /// /// This sample shows how you can use the [Dismissible] widget to -/// remove list items using swipe gestures. +/// remove list items using swipe gestures. Swipe any of the list +/// tiles to the left or right to dismiss them from the [ListView]. /// /// ```dart /// List items = List.generate(100, (index) => index); diff --git a/packages/flutter/lib/src/widgets/drag_target.dart b/packages/flutter/lib/src/widgets/drag_target.dart index 22a2e9001f..3081c954da 100644 --- a/packages/flutter/lib/src/widgets/drag_target.dart +++ b/packages/flutter/lib/src/widgets/drag_target.dart @@ -99,7 +99,7 @@ enum DragAnchor { /// /// {@youtube 560 315 https://www.youtube.com/watch?v=QzA4c4QHZCY} /// -/// {@tool dartpad --template=stateful_widget_material} +/// {@tool dartpad --template=stateful_widget_scaffold} /// /// The following example has a [Draggable] widget along with a [DragTarget] /// in a row demonstrating an incremented `acceptedData` integer value when diff --git a/packages/flutter/lib/src/widgets/shortcuts.dart b/packages/flutter/lib/src/widgets/shortcuts.dart index a56755e641..88234695f0 100644 --- a/packages/flutter/lib/src/widgets/shortcuts.dart +++ b/packages/flutter/lib/src/widgets/shortcuts.dart @@ -424,10 +424,18 @@ class ShortcutManager extends ChangeNotifier with Diagnosticable { /// child: Focus( /// autofocus:true, /// child: Column( +/// mainAxisAlignment: MainAxisAlignment.center, /// children: [ -/// Text('Add to the counter by pressing keyboard Shift and keyboard "K"'), -/// Text('Subtract from the counter by pressing keyboard Shift and keyboard "L"'), -/// Text('count: $count'), +/// Text('Add: keyboard Shift + "k"'), +/// Text('Subtract: keyboard Shift + "l"'), +/// SizedBox(height: 10.0), +/// ColoredBox( +/// color: Colors.yellow, +/// child: Padding( +/// padding: EdgeInsets.all(4.0), +/// child: Text('count: $count'), +/// ), +/// ), /// ], /// ), /// ),