OutlineButton class

A cross between RaisedButton and FlatButton: a bordered button whose elevation increases and whose background becomes opaque when the button is pressed.

An outline button's elevation is initially 0.0 and its background color is transparent. When the button is pressed its background becomes opaque and then its elevation increases to highlightElevation.

The outline button has a border whose shape is defined by shape and whose appearance is defined by borderSide, disabledBorderColor, and highlightedBorderColor.

If the onPressed callback is null, then the button will be disabled and by default will resemble a flat button in the disabledColor.

If you want an ink-splash effect for taps, but don't want to use a button, consider using InkWell directly.

Outline buttons have a minimum size of 88.0 by 36.0 which can be overidden with ButtonTheme.

See also:

Inheritance

Constructors

OutlineButton({Key key, @required VoidCallback onPressed, ButtonTextTheme textTheme, Color textColor, Color disabledTextColor, Color color, Color highlightColor, Color splashColor, double highlightElevation: 2.0, BorderSide borderSide, Color disabledBorderColor, Color highlightedBorderColor, EdgeInsetsGeometry padding, ShapeBorder shape, Widget child })
Create a filled button. [...]
const
OutlineButton.icon({Key key, @required VoidCallback onPressed, ButtonTextTheme textTheme, Color textColor, Color disabledTextColor, Color color, Color highlightColor, Color splashColor, double highlightElevation: 2.0, BorderSide borderSide, Color disabledBorderColor, Color highlightedBorderColor, ShapeBorder shape, @required Widget icon, @required Widget label })
Create an outline button from a pair of widgets that serve as the button's icon and label. [...]

Properties

borderSide BorderSide
Defines the color of the border when the button is enabled but not pressed, and the border outline's width and style in general. [...]
final
child Widget
The button's label. [...]
final
color Color
The button's opaque fill color when it's enabled and has been pressed. [...]
final
disabledBorderColor Color
The outline border's color when the button is not enabled. [...]
final
disabledTextColor Color
The color to use for this button's text when the button is disabled. [...]
final
enabled bool
Whether the button is enabled or disabled. [...]
read-only
highlightColor Color
The highlight color of the button's InkWell. [...]
final
highlightedBorderColor Color
The outline border's color when the button is enabled and pressed. [...]
final
highlightElevation double
The elevation of the button when it's enabled and has been pressed. [...]
final
onPressed VoidCallback
Called when the button is tapped or otherwise activated. [...]
final
padding EdgeInsetsGeometry
The internal padding for the button's child. [...]
final
shape ShapeBorder
The shape of the button's Material and its outline. [...]
final
splashColor Color
The splash color of the button's InkWell. [...]
final
textColor Color
The color to use for this button's text. [...]
final
textTheme ButtonTextTheme
Defines the button's base colors, and the defaults for the button's minimum size, internal padding, and shape. [...]
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

Methods

createState() → _OutlineButtonState
Creates the mutable state for this widget at a given location in the tree. [...]
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree. [...]
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children. [...]
@protected, inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toDiagnosticsNode({String name, DiagnosticsTreeStyle style }) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by toStringDeep. [...]
inherited
toString({DiagnosticLevel minLevel: DiagnosticLevel.debug }) String
Returns a string representation of this object.
inherited
toStringDeep({String prefixLineOne: '', String prefixOtherLines, DiagnosticLevel minLevel: DiagnosticLevel.debug }) String
Returns a string representation of this node and its descendants. [...]
inherited
toStringShallow({String joiner: ', ', DiagnosticLevel minLevel: DiagnosticLevel.debug }) String
Returns a one-line detailed description of the object. [...]
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited