From 200c23c13982ad60de48ade7cb94918ca98afdf6 Mon Sep 17 00:00:00 2001 From: Abhishek Ghaskata Date: Wed, 17 Feb 2021 23:56:04 +0530 Subject: [PATCH] Added OutlinedButton code sample (#76013) --- .../lib/src/material/outlined_button.dart | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/flutter/lib/src/material/outlined_button.dart b/packages/flutter/lib/src/material/outlined_button.dart index e9a0f1dc0c..af10f032c1 100644 --- a/packages/flutter/lib/src/material/outlined_button.dart +++ b/packages/flutter/lib/src/material/outlined_button.dart @@ -41,6 +41,22 @@ import 'theme_data.dart'; /// outlined buttons in an app can be overridden with the [Theme]'s /// [ThemeData.outlinedButtonTheme] property. /// +/// {@tool dartpad --template=stateless_widget_scaffold_center} +/// +/// Here is an example of a basic [OutlinedButton]. +/// +/// ```dart +/// Widget build(BuildContext context) { +/// return OutlinedButton( +/// onPressed: () { +/// print('Received click'); +/// }, +/// child: const Text('Click Me'), +/// ); +/// } +/// ``` +/// {@end-tool} +/// /// The static [styleFrom] method is a convenient way to create a /// outlined button [ButtonStyle] from simple values. ///