MyRoundedLoadingButton class

Animated button used by SFutureButton to display loading/success/error states.

Inheritance
Available extensions

Constructors

MyRoundedLoadingButton({Key? key, required SRoundedLoadingButtonController controller, required VoidCallback? onPressed, required Widget child, Key? contentKey, String? semanticLabel, Color? color = Colors.lightBlue, double height = 50, double width = 300, double loaderSize = 24.0, double loaderStrokeWidth = 2.0, bool animateOnTap = true, Color valueColor = Colors.white, double borderRadius = 35, double elevation = 2, Duration duration = const Duration(milliseconds: 400), Curve curve = Curves.easeInOutCirc, Color? errorColor = Colors.red, Color? successColor, Duration resetDuration = const Duration(seconds: 12), bool resetAfterDuration = false, IconData successIcon = Icons.check, IconData failedIcon = Icons.close, Curve completionCurve = Curves.elasticOut, Duration completionDuration = const Duration(milliseconds: 800), Color? disabledColor, FocusNode? focusNode, void onFocusChange(bool)?, Widget? customLoaderWidget})
initialize constructor

Properties

animateOnTap → bool
Whether to trigger the animation on the tap event
final
borderRadius → double
The radius of the button border
final
child → Widget
The button's label
final
color → Color?
The primary color of the button
final
completionCurve → Curve
The success and failed animation curve
final
completionDuration → Duration
The duration of the success and failed animation
final
contentKey → Key?
Identity for child when its content changes while the button remains mounted.
final
controller → SRoundedLoadingButtonController
Button controller, now required
final
curve → Curve
The curve of the shrink animation
final
customLoaderWidget → Widget?
Custom widget to display while loading.
final
disabledColor → Color?
The color of the button when it is disabled
final
duration → Duration
The duration of the button animation
final
elevation → double
The elevation of the raised button
final
errorColor → Color?
The color of the button when it is in the error state
final
failedIcon → IconData
The icon for the failed state
final
focusNode → FocusNode?
Optional focus node for managing focus state
final
hashCode → int
The hash code for this object.
no setterinherited
height → double
The vertical extent of the button.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loaderSize → double
The size of the CircularProgressIndicator
final
loaderStrokeWidth → double
The stroke width of the CircularProgressIndicator
final
onFocusChange → void Function(bool)?
final
onPressed → VoidCallback?
The callback that is called when the button is tapped or otherwise activated.
final
resetAfterDuration → bool
reset the animation after specified duration, use resetDuration parameter to set Duration, defaults to 15 seconds
final
resetDuration → Duration
Duration after which reset the button
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel → String?
Accessible name announced for the button.
final
successColor → Color?
The color of the button when it is in the success state
final
successIcon → IconData
The icon for the success state
final
valueColor → Color
The color of the static icons
final
width → double
The horizontal extent of the button.
final

Methods

addMaterialWidget() → Material

Available on Widget, provided by the GenericExtensions extension

addTooltipWidget(String toolTip) → Tooltip

Available on Widget, provided by the GenericExtensions extension

borderRadius([BorderRadiusGeometry? borderRadius]) → Widget

Available on Widget, provided by the GenericExtensions extension

boxDecoration([BoxDecoration? boxDecoration]) → Widget

Available on Widget, provided by the GenericExtensions extension

colorFilter([ColorFilter? colorFilter]) → Widget

Available on Widget, provided by the GenericExtensions extension

set parent widget in center
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
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