SubZeroButtonGroup class
A container widget that arranges a set of related buttons in a horizontal row.
Implements correct spacing between buttons and handles overflow gracefully by wrapping on smaller screens.
Example usage:
SubZeroButtonGroup(
children: [
SubZeroButton(label: 'Cancel', variant: SubZeroButtonVariant.secondary, onPressed: () {}),
SubZeroButton(label: 'Save', variant: SubZeroButtonVariant.primary, onPressed: () {}),
],
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- SubZeroButtonGroup
- Available extensions
Constructors
-
SubZeroButtonGroup({Key? key, required List<
Widget> children, double spacing = SubZeroSpacing.sm, MainAxisAlignment alignment = MainAxisAlignment.start, bool fullWidth = false, bool wrap = true, double runSpacing = SubZeroSpacing.sm}) -
const
Properties
- alignment → MainAxisAlignment
-
Whether buttons should be aligned at the start, center, or end
final
-
children
→ List<
Widget> -
The list of button widgets to display
final
- fullWidth → bool
-
Whether the button group should take full width
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runSpacing → double
-
Vertical spacing when buttons wrap to new line
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spacing → double
-
Spacing between buttons
final
- wrap → bool
-
Whether to wrap buttons on overflow (responsive)
final
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
-
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
-
withCountBadge(
{required int count, int maxCount = 99, SubZeroBadgeStyle style = SubZeroBadgeStyle.filled, SubZeroBadgeSize size = SubZeroBadgeSize.medium, SubZeroBadgeAlignment alignment = const SubZeroBadgeAlignment(), bool show = true}) → Widget -
Available on Widget, provided by the SubZeroBadgeExtension extension
Wrap this widget with a count badge -
withDotBadge(
{SubZeroBadgeStyle style = SubZeroBadgeStyle.filled, SubZeroBadgeSize size = SubZeroBadgeSize.medium, SubZeroBadgeAlignment alignment = const SubZeroBadgeAlignment(), bool show = true}) → Widget -
Available on Widget, provided by the SubZeroBadgeExtension extension
Wrap this widget with a dot badge
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited