StateOutlinedButton class

Inheritance

Constructors

StateOutlinedButton({Key? key, required StateFunction<StateOutlinedButton, ButtonState> onTap, required Widget initial, Widget? fail, Widget? success, Widget? loader, Widget? disable, ButtonStyle? style, Widget? icon, Widget? loaderIcon, Widget? failIcon, Widget? successIcon, Widget? disableIcon, Set<ButtonState>? states})
const
StateOutlinedButton.future({Key? key, required StateFutureFunction<Set<ButtonState>> futureOnTab, required Widget initial, Widget? icon, Widget? loaderIcon, Widget? successIcon, Widget? failIcon, Widget? disableIcon, Widget? fail, Widget? success, Widget? loader, Widget? disable, ButtonStyle? style, bool hasState = true})
StateOutlinedButton with states = null and without use global key. The state will be ButtonState.progressing when futureOnTab start and end with ButtonState return in futureOnTab
factory

Properties

disable Widget?
ButtonState.disabled child widget
final
disableIcon Widget?
ButtonState.disabled if use ElevatedButton.icon
final
fail Widget?
ButtonState.fail child widget
final
failIcon Widget?
ButtonState.fail if use OutlinedButton.icon
final
hashCode int
The hash code for this object.
no setterinherited
icon Widget?
default if use OutlinedButton.icon
final
initial Widget
default child widget, in undefine state
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loader Widget?
ButtonState.loader child widget
final
loaderIcon Widget?
ButtonState.progressing if use OutlinedButton.icon
final
onTap StateFunction<StateOutlinedButton, ButtonState>
the function run when press the button
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
states Set<ButtonState>?
states != null with be apply this state, else with be apply with setCustomState function in key
final
style ButtonStyle?
custom style child widget
final
success Widget?
ButtonState.success child widget
final
successIcon Widget?
ButtonState.success if use OutlinedButton.icon
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
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
defaultStyleOf(BuildContext context) ButtonStyle
Default StateOutlinedButton style
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

Static Methods

styleFrom({Color? primary, Color? onSurface, Color? backgroundColor, Color? shadowColor, double? elevation, TextStyle? textStyle, EdgeInsetsGeometry? padding, Size? minimumSize, Size? fixedSize, Size? maximumSize, BorderSide? side, OutlinedBorder? shape, MouseCursor? enabledMouseCursor, MouseCursor? disabledMouseCursor, VisualDensity? visualDensity, MaterialTapTargetSize? tapTargetSize, Duration? animationDuration, bool? enableFeedback, AlignmentGeometry? alignment, InteractiveInkFeatureFactory? splashFactory, BorderSide? successSide, Color? success, BorderSide? failSide, Color? fail, Color? disable, BorderSide? disableSide}) ButtonStyle
like OutlinedButton.styleFrom with state color for foreground success, fail and state color for side with successSide, failSide