CustomButton class

Inheritance

Constructors

CustomButton({Key? key, Pressed pressed = Pressed.notPressed, bool vibrate = true, Color? shadowColor, CrossAxisAlignment crossAxis = CrossAxisAlignment.start, Widget? subtitle, List<Widget>? rowChildren, MainAxisAlignment mainAxis = MainAxisAlignment.center, double? width, double? height, bool isThreeD = false, required void onPressed()?, bool reversePosition = false, String? title, Widget? child, Gradient? gradient, Color? backgroundColor, Widget? iconWidget, ButtonAsset? asset, List<BoxShadow>? boxShadow, EdgeInsets? margin, EdgeInsets? padding, double? borderRadius, bool animate = false, Decoration? decoration, bool isLoading = false})
const

Properties

animate bool
the core property of the widget default value is false but the user can set it to true and the button will start animating if isThreeD is also true
final
asset ButtonAsset?
final
backgroundColor Color?
final
borderRadius double?
final
boxShadow List<BoxShadow>?
final
child Widget?
final
crossAxis CrossAxisAlignment
final
decoration Decoration?
final
gradient Gradient?
final
hashCode int
The hash code for this object.
no setterinherited
height double?
height of the button when the button's animate property is set to true then the user has to give a height value to the button or the button will not work
final
iconWidget Widget?
final
isLoading bool
this can be used to pass in the value is the button is loading then circular progress will be shown
final
isThreeD bool
when isThreeD is on then also give a color to the button or the 3d effect won't be visible cause the bottom will take the same color as the shadow color that is being used to have the 3d effect on the button this will allow us to basically have 4 default values for the shadow set it to true to get the 3d effect which in simple terms is basically box shadow
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
mainAxis MainAxisAlignment
used to give the mainAxis value to the row
final
margin EdgeInsets?
final
onPressed → (void Function()?)
final
padding EdgeInsets?
final
pressed Pressed
this is the value of the button when the animate property is set to true and isThree is also true then using this value we can have the disabled button effect where the button is pressed inside using the Pressed.pressed value and using the default value Pressed.notPressed the button can be restored to 3d version
final
reversePosition bool
final
rowChildren List<Widget>?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadowColor Color?
final
subtitle Widget?
final
title String?
final
vibrate bool
final
width double?
width of the button
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<CustomButton>
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}) 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