SemanticButton class

A button widget that can be styled semantically based on the application's design system.

Inheritance
Annotations

Constructors

SemanticButton({Key? key, required String text, VoidCallback? onTap, SemanticEnum type = SemanticEnum.primary, bool isOutlined = false, double radius = 4, BorderRadiusGeometry? borderRadius, double? fontSize, FontWeight? fontWeight, Widget? prefixIcon, Widget? suffixIcon, SizeEnum size = SizeEnum.defaultSize, double? height, double? width, bool shrink = false, OutlineStyle outlineStyle = OutlineStyle.solid, double outlineWidth = 1.0, Gradient? gradient, Color? color})
Constructs a SemanticButton.
const

Properties

borderRadius → BorderRadiusGeometry?
Custom border radius for the button. Overrides radius if provided.
final
color → Color?
final
fontSize → double?
The font size of the button text. Defaults to the size token.
final
fontWeight → FontWeight?
The font weight of the button text.
final
gradient → Gradient?
final
hashCode → int
The hash code for this object.
no setterinherited
height → double?
The fixed height of the button. If null, the height is determined by the content and size.
final
isOutlined → bool
Whether the button should be outlined instead of filled.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onTap → VoidCallback?
The callback function that is called when the button is tapped.
final
outlineStyle → OutlineStyle
The style of the outline drawn around the button.
final
outlineWidth → double
The width of the outline stroke.
final
prefixIcon → Widget?
An optional widget to display before the button text.
final
radius → double
The radius of the button's corners.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shrink → bool
Whether the button width should shrink to fit its child.
final
size → SizeEnum
The size of the button which affects its padding and font size.
final
suffixIcon → Widget?
An optional widget to display after the button text.
final
text → String
The text to display on the button.
final
type → SemanticEnum
The semantic type of the button which determines its color and styling.
final
width → double?
final

Methods

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