Skip to content

Commit 200c23c

Browse files
Added OutlinedButton code sample (flutter#76013)
1 parent b54d72c commit 200c23c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/flutter/lib/src/material/outlined_button.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,22 @@ import 'theme_data.dart';
4141
/// outlined buttons in an app can be overridden with the [Theme]'s
4242
/// [ThemeData.outlinedButtonTheme] property.
4343
///
44+
/// {@tool dartpad --template=stateless_widget_scaffold_center}
45+
///
46+
/// Here is an example of a basic [OutlinedButton].
47+
///
48+
/// ```dart
49+
/// Widget build(BuildContext context) {
50+
/// return OutlinedButton(
51+
/// onPressed: () {
52+
/// print('Received click');
53+
/// },
54+
/// child: const Text('Click Me'),
55+
/// );
56+
/// }
57+
/// ```
58+
/// {@end-tool}
59+
///
4460
/// The static [styleFrom] method is a convenient way to create a
4561
/// outlined button [ButtonStyle] from simple values.
4662
///

0 commit comments

Comments
 (0)