SuraRaisedButton class

Inheritance
Available Extensions

Constructors

SuraRaisedButton({Key? key, required VoidCallback? onPressed, required Widget child, Color loadingColor = Colors.white, EdgeInsets margin = const EdgeInsets.symmetric(vertical: 16), EdgeInsets padding = const EdgeInsets.symmetric(vertical: 8, horizontal: 16), bool fullWidth = false, OutlinedBorder? shape = const StadiumBorder(), double? elevation = 2.0, ValueNotifier<bool>? loadingNotifier, Widget? loadingWidget, Color? color, Color? textColor, Widget? icon, Function? onLongPressed, MainAxisAlignment? alignment, BorderSide? borderSide})
Create a button with loading notifier

Properties

alignment MainAxisAlignment?
child's alignment
final
borderSide BorderSide?
final
child Widget
final
color Color?
Button's background Color
final
elevation double?
final
fullWidth bool
if fullWidth is true, Button will take all remaining horizontal space
final
hashCode int
The hash code for this object.
no setterinherited
icon Widget?
An icon to show at before child
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loadingColor Color
Loading indicator's color, default is white
final
loadingNotifier ValueNotifier<bool>?
receive a ValueNotifier to indicate a loading widget
final
loadingWidget Widget?
A widget to show when loading, if the value is null, it will use a loading widget from SuraProvider or CircularProgressIndicator
final
margin EdgeInsets
Button's margin
final
onLongPressed Function?
final
onPressed VoidCallback?
final
padding EdgeInsets
Button's padding
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape OutlinedBorder?
Button's shape, default is StadiumBorder
final
textColor Color?
Text's color for a child that usually a Text
final
width double?
getter/setter pair

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's 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
maintainWidthOnLoading() → void
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