Unverified Commit 20ca6997 authored by Shi-Hao Hong's avatar Shi-Hao Hong Committed by GitHub

Code sample small fixes (#70343)

parent 9e5c8771
......@@ -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."),
/// );
/// }
/// ```
......
......@@ -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.
......
......@@ -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<int> items = List<int>.generate(100, (index) => index);
......
......@@ -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
......
......@@ -424,10 +424,18 @@ class ShortcutManager extends ChangeNotifier with Diagnosticable {
/// child: Focus(
/// autofocus:true,
/// child: Column(
/// mainAxisAlignment: MainAxisAlignment.center,
/// children: <Widget>[
/// 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'),
/// ),
/// ),
/// ],
/// ),
/// ),
......
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