OneContainedButton class

oneui Contained button may be used as elevated button in Material Design

Inheritance

Constructors

OneContainedButton({Key? key, double borderRadius = 50.0, required dynamic child, required VoidCallback onPressed, Color? backgroundColor, double? height, VoidCallback? onLongPress, Color? contentColor, double? width, bool disabled = false, bool loading = false})
const

Properties

backgroundColor Color?
the color to apply to the background
final
borderRadius double
defines the border radius for the ContainedButton. default is 50.0
final
child → dynamic
defines the child of the ContainedButton. can be String or Widget.
final
contentColor Color?
the content | text color.
final
disabled bool
defines if the button is disabled
final
hashCode int
The hash code for this object.
no setterinherited
height double?
the height of the button
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loading bool
defines if the button is loading: shows a OneSpinner in the center with the contentColor as default color.
final
onLongPress VoidCallback?
a callback called when the button is long-pressed
final
onPressed VoidCallback
a callback called when the button is tapped
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width double?
the button width.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<OneContainedButton>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent 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 DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) 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 ==(Object other) bool
The equality operator.
inherited