Add Scaffold to Tooltip code samples (#69532)
This commit is contained in:
parent
a371fbcc1b
commit
57a13c3e3b
@ -30,7 +30,7 @@ import 'tooltip_theme.dart';
|
|||||||
///
|
///
|
||||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=EeEfD5fI-5Q}
|
/// {@youtube 560 315 https://www.youtube.com/watch?v=EeEfD5fI-5Q}
|
||||||
///
|
///
|
||||||
/// {@tool dartpad --template=stateless_widget_material}
|
/// {@tool dartpad --template=stateless_widget_scaffold_center}
|
||||||
///
|
///
|
||||||
/// This example show a basic [Tooltip] which has a [Text] as child.
|
/// This example show a basic [Tooltip] which has a [Text] as child.
|
||||||
/// [message] contains your label to be shown by the tooltip when
|
/// [message] contains your label to be shown by the tooltip when
|
||||||
@ -38,17 +38,15 @@ import 'tooltip_theme.dart';
|
|||||||
///
|
///
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// Widget build(BuildContext context) {
|
/// Widget build(BuildContext context) {
|
||||||
/// return Center(
|
/// return Tooltip(
|
||||||
/// child: Tooltip(
|
/// message: "I am a Tooltip",
|
||||||
/// message: "I am a Tooltip",
|
/// child: Text("Tap this text and hold down to show a tooltip."),
|
||||||
/// child: Text("Tap this text and hold down to show a tooltip."),
|
|
||||||
/// ),
|
|
||||||
/// );
|
/// );
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
/// {@end-tool}
|
/// {@end-tool}
|
||||||
///
|
///
|
||||||
/// {@tool dartpad --template=stateless_widget_material}
|
/// {@tool dartpad --template=stateless_widget_scaffold_center}
|
||||||
///
|
///
|
||||||
/// This example covers most of the attributes available in Tooltip.
|
/// This example covers most of the attributes available in Tooltip.
|
||||||
/// `decoration` has been used to give a gradient and borderRadius to Tooltip.
|
/// `decoration` has been used to give a gradient and borderRadius to Tooltip.
|
||||||
@ -64,23 +62,21 @@ import 'tooltip_theme.dart';
|
|||||||
///
|
///
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// Widget build(BuildContext context) {
|
/// Widget build(BuildContext context) {
|
||||||
/// return Center(
|
/// return Tooltip(
|
||||||
/// child: Tooltip(
|
/// message: "I am a Tooltip",
|
||||||
/// message: "I am a Tooltip",
|
/// child: Text("Tap this text and hold down to show a tooltip."),
|
||||||
/// child: Text("Tap this text and hold down to show a tooltip."),
|
/// decoration: BoxDecoration(
|
||||||
/// decoration: BoxDecoration(
|
/// borderRadius: BorderRadius.circular(25),
|
||||||
/// borderRadius: BorderRadius.circular(25),
|
/// gradient: LinearGradient(colors: [Colors.amber, Colors.red]),
|
||||||
/// gradient: LinearGradient(colors: [Colors.amber, Colors.red]),
|
|
||||||
/// ),
|
|
||||||
/// height: 50,
|
|
||||||
/// padding: EdgeInsets.all(8.0),
|
|
||||||
/// preferBelow: false,
|
|
||||||
/// textStyle: TextStyle(
|
|
||||||
/// fontSize: 24,
|
|
||||||
/// ),
|
|
||||||
/// showDuration: Duration(seconds: 2),
|
|
||||||
/// waitDuration: Duration(seconds: 1),
|
|
||||||
/// ),
|
/// ),
|
||||||
|
/// height: 50,
|
||||||
|
/// padding: EdgeInsets.all(8.0),
|
||||||
|
/// preferBelow: false,
|
||||||
|
/// textStyle: TextStyle(
|
||||||
|
/// fontSize: 24,
|
||||||
|
/// ),
|
||||||
|
/// showDuration: Duration(seconds: 2),
|
||||||
|
/// waitDuration: Duration(seconds: 1),
|
||||||
/// );
|
/// );
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user