A material design "raised button".
A raised button consists of a rectangular piece of material that hovers over the interface.
Use raised buttons to add dimension to otherwise mostly flat layouts, e.g. in long busy lists of content, or in wide spaces. Avoid using raised buttons on already-raised content such as dialogs or cards.
If the onPressed callback is null, then the button will be disabled and by default will appear like a flat button in the disabledColor. If you are trying to change the button's color and it is not having any effect, check that you are passing a non-null onPressed handler.
Requires one of its ancestors to be a Material widget.
If you want an ink-splash effect for taps, but don't want to use a button, consider using InkWell directly.
- FlatButton, a material design button without a shadow.
- DropdownButton, a button that shows options to select from.
- FloatingActionButton, the round button in material applications.
- IconButton, to create buttons that just contain icons.
- InkWell, which implements the ink splash part of a flat button.
- child → Widget
The widget below this widget in the tree.final
- color → Color
The primary color of the button, as printed on the Material, while it is in its default (unpressed, enabled) state.final
- colorBrightness → Brightness
The theme brightness to use for this button.final
- disabledColor → Color
The color of the button when the button is disabled. Buttons are disabled by default. To enable a button, set its onPressed property to a non-null value.final
- disabledElevation → double
The z-coordinate at which to place this button when disabled.final
- elevation → double
The z-coordinate at which to place this button.final
- enabled → bool
Whether the button is enabled or disabled. Buttons are disabled by default. To enable a button, set its onPressed property to a non-null value.read-only
- highlightColor → Color
The secondary color of the button when the button is in the down (pressed) state. The higlight color is represented as a solid color that is overlaid over the button color (if any). If the highlight color has transparency, the button color will show through. The highlight fades in quickly as the button is held down.final
- highlightElevation → double
The z-coordinate at which to place this button when highlighted.final
- onPressed → VoidCallback
The callback that is called when the button is tapped or otherwise activated.final
- splashColor → Color
The primary color of the button when the button is in the down (pressed) state. The splash is represented as a circular overlay that appears above the highlightColor overlay. The splash overlay has a center point that matches the hit point of the user touch event. The splash overlay will expand to fill the button area if the touch is held for long enough time. If the splash color has transparency then the highlight and button color will show through.final
- hashCode → int
The hash code for this object.read-only, inherited
- key → Key
Controls how one widget replaces another widget in the tree.final, inherited
- runtimeType → Type
A representation of the runtime type of the object.read-only, inherited
BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
) → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.inherited
List<String> description) → void
Add additional information to the given description for use by toString.@mustCallSuper, @protected, inherited
Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.inherited
) → String
Returns a string representation of this object.inherited
) → String
A short, textual description of this widget.inherited