JBButton class

Inheritance
Available extensions

Constructors

JBButton({Key? key, required String text, required VoidCallback onPressed, String? type, Widget? icon, Widget? child})
const

Properties

child Widget?
final
hashCode int
The hash code for this object.
no setterinherited
icon Widget?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onPressed VoidCallback
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String
final
type String?
final

Methods

aligned({AlignmentGeometry alignment = Alignment.center}) Widget

Available on Widget, provided by the WidgetExtension extension

Align widget
build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
centered() Widget

Available on Widget, provided by the WidgetExtension extension

Center any widget
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
expanded() Widget

Available on Widget, provided by the WidgetExtension extension

Expanded any widget
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onTap(VoidCallback onTap) Widget

Available on Widget, provided by the WidgetExtension extension

Add tap functionality without manually wrapping with GestureDetector
onTapWithEffect(VoidCallback onTap, {Color? effectColor, ShapeBorder? shape, BorderRadius? borderRadius}) Widget

Available on Widget, provided by the WidgetExtension extension

scrollable({Axis axis = Axis.vertical}) Widget

Available on Widget, provided by the WidgetExtension extension

Make widget scrollable (useful for long Column in small screens)
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
withBottomPadding(double value) Widget

Available on Widget, provided by the WidgetExtension extension

Add only bottom padding
withHeight(double height) Widget

Available on Widget, provided by the WidgetExtension extension

Add height
withLeftPadding(double value) Widget

Available on Widget, provided by the WidgetExtension extension

Add only left padding
withMargin([EdgeInsetsGeometry margin = const EdgeInsets.all(8)]) Widget

Available on Widget, provided by the WidgetExtension extension

Add margin using Container
withPadding([EdgeInsetsGeometry padding = const EdgeInsets.all(8)]) Widget

Available on Widget, provided by the WidgetExtension extension

Add padding to any widget
withPaddingAll(double padding) Widget

Available on Widget, provided by the WidgetExtension extension

Add padding to any widget
withRightPadding(double value) Widget

Available on Widget, provided by the WidgetExtension extension

Add only right padding
withRoundedCorners([double radius = 12]) Widget

Available on Widget, provided by the WidgetExtension extension

Add rounded corners (useful for containers/images)
withSize({double? width, double? height}) Widget

Available on Widget, provided by the WidgetExtension extension

Add a sized box wrapper
withSymmetricPadding({double vertical = 0, double horizontal = 0}) Widget

Available on Widget, provided by the WidgetExtension extension

Add symmetric padding
withTopPadding(double value) Widget

Available on Widget, provided by the WidgetExtension extension

Add only top padding
withWidth(double width) Widget

Available on Widget, provided by the WidgetExtension extension

Add width

Operators

operator ==(Object other) bool
The equality operator.
inherited