Commit 47c835fb authored by Shivam Bhasin's avatar Shivam Bhasin Committed by Kate Lovett

Add Sample code for FlatButton #21136 (#27751)

* Update flat_button.dart

* Added smaple code for Flat Button

* Update flat_button.dart

* Revert "Update flat_button.dart"

This reverts commit c8f00dff39e18b267295890bd0c5a86979b58c24.

* Revert "Added smaple code for Flat Button"

This reverts commit adc4234bc7956293a5b56f39701c6967fe3e919a.

* Update flat_button.dart

* Update flat_button.dart

* Update flat_button.dart

* remove white spaces

* remove white spaces

* add two different samples

* Update flat_button.dart
parent e1e5b23a
......@@ -40,6 +40,48 @@ import 'theme_data.dart';
///
/// The [clipBehavior] argument must not be null.
///
/// {@tool sample}
///
/// This example shows a simple [FlatButton].
///
/// ```dart
/// FlatButton(
/// onPressed: () {
/// /*...*/
/// },
/// child: Text(
/// "Flat Button",
/// ),
/// )
/// ```
/// {@end-tool}
///
/// {@tool sample}
///
/// This example shows a [FlatButton] that is normally white-on-blue,
/// with splashes rendered in a different shade of blue.
/// It turns black-on-grey when disabled.
/// The button has 8px of padding on each side, and the text is 20px high.
///
/// ```dart
/// FlatButton(
/// color: Colors.blue,
/// textColor: Colors.white,
/// disabledColor: Colors.grey,
/// disabledTextColor: Colors.black,
/// padding: EdgeInsets.all(8.0),
/// splashColor: Colors.blueAccent,
/// onPressed: () {
/// /*...*/
/// },
/// child: Text(
/// "Flat Button",
/// style: TextStyle(fontSize: 20.0),
/// ),
/// )
/// ```
/// {@end-tool}
///
/// See also:
///
/// * [RaisedButton], a filled button whose material elevates when pressed.
......
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