AwaitableOutlinedButton<R> class

Button with indicator display during processing to prevent consecutive hits.

Setting an asynchronous function to onPressed will display an indicator during execution and prevent pressing. whenComplete is executed when onPressed completes without throwing an exception child specifies the string to be displayed on the button If executingChild is specified, the string can be displayed with the running indicator. If buttonStyle is not specified, the value set in Theme Use ElevatedButtonThemeData in Theme.of(context).

Inheritance

Constructors

AwaitableOutlinedButton({Key? key, required OnPressed<R>? onPressed, WhenComplete<R>? whenComplete, OnError? onError, ButtonStyle? buttonStyle, Color? indicatorColor, Size? indicatorSize, double? indicatorStrokeWidth, Widget? indicator, Widget? executingChild, required Widget child})
Create an AwaitableOutlinedButton.
const

Properties

buttonStyle ButtonStyle?
Customizes this button's appearance.
finalinherited
buttonType → ButtonType
ButtonType has ElevatedButton, OutlinedButton, TextButton types.
finalinherited
child Widget
Typically the button's label.
finalinherited
executingChild Widget?
Widget to display while running.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
indicator Widget?
Widget to display as an indicator during asynchronous processing. Cannot be specified when indicatorColor is specified.
finalinherited
indicatorColor Color?
Indicator color during asynchronous processing. If null, color and circularTrackColor of ThemeData.progressIndicatorTheme are used. Cannot be specified if indicator is specified.
finalinherited
indicatorSize Size?
Indicator size during asynchronous processing. Cannot be specified if indicator is specified. If this field and the indicator are null, then Size.square(24) is used.
finalinherited
indicatorStrokeWidth double?
Indicator strokeWidth during asynchronous processing. Cannot be specified if indicator is specified. If this field and the indicator are null, then 4 is used.
finalinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onError → OnError?
Callback when onPressed throws an exception.
finalinherited
onPressed → OnPressed<R>?
Called when the button is tapped or otherwise activated. Return values can be used to pass values to whenComplete.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
whenComplete → WhenComplete<R>?
Callback when onPressed completes without throwing an exception. Receive the return value of onPressed.
finalinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _AwaitableButtonState<R>
Creates the mutable state for this widget at a given location in the tree.
inherited
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}) 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