Button


A push button with a text label. More...
import Material 0.2
Properties and Methods

Detailed Description

A push button with a text label.

A button clearly communicates what action will occur when the user touches it. It consists of text, an image, or both, designed in accordance with your app’s color theme.

There are three standard types of buttons:

This componenent provides raised and flat buttons. For floating action buttons, see ActionButton.

Here are some example buttons:

See the Material Design spec for details on how to use buttons.

Properties

backgroundColor : color

The background color of the button. By default, this is white for a raised button and transparent for a flat button.

darkBackground : bool

Set to true if the button is on a dark background

darkButton : bool

Set to true if the button has a dark background color

elevation : int

The elevation of the button. Normally either 0 or 1.

textColor : color

The text color of the button. By default, this is calculated based on the background color, but it can be customized to the theme's primary color or another color.