Flutter have lots and lots of Button component, common component has buttons: RaisedButton, FlatButton, IconButton, OutlineButton, ButtonBar, FloatingActionButton and so on.
RaisedButton: protruding buttons, in fact, Material Design Style ButtonFlatButton: flat buttonOutlineButton: Wireframe buttonIconButton: Icon buttonButtonBar: Button group
Flutter button component in some of the attributes:
Property Name | Value Type | Property Value |
onPressed
|
VoidCallback, a method generally receives
|
Required parameters, callbacks triggered when the button is pressed, a reception method, pass null to disable the button will appear disabled-related style
|
child
|
Widget
|
Text Control
|
textColor
|
Color
|
Text Color
|
color
|
Color |
Button color
|
disabledColor
|
Color |
Color when the button is disabled
|
disabledTextColor
|
Color |
Text color button disabled
|
splashColor
|
Color |
Click the button color water wave
|
highlightColor
|
Color |
Click (press) color button after button
|
elevation
|
double
|
Shaded range, the larger the value the greater the area shaded
|
padding
|
Padding
|
|
shape
|
Set the shape of a button
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(10),
)
shape: CircleBorder(
side: BorderSide(
color: Colors.white,
)
)
|