* 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
This commit is contained in:
parent
e1e5b23ac6
commit
47c835fb2b
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user