ZeroButtonGroup class

Inheritance

Constructors

ZeroButtonGroup.new({Key? key, required List<bool> selecteds, List<String>? labels, List<IconData>? icons, IconData? selectIcon, bool withIcon = false, ZeroSizeType buttonSizeType = ZeroSizeType.medium, ZeroButtonRadiusType buttonRadiusType = ZeroButtonRadiusType.curved, ButtonItemType buttonItemType = ButtonItemType.labelsOnly, bool? square, bool? vertical, bool? multipleSelect, ButtonGroupType buttonGroupType = ButtonGroupType.filled, ZeroButtonGroupStyle? style, ZeroButtonGroupCallback? onChanged})
const
ZeroButtonGroup.iconsOnly({Key? key, required List<IconData>? icons, required List<bool> selecteds, bool? square = true, ButtonGroupType buttonGroupType = ButtonGroupType.filled, ZeroSizeType buttonSizeType = ZeroSizeType.medium, bool? vertical = false, bool? multipleSelect = false, ZeroButtonRadiusType buttonRadiusType = ZeroButtonRadiusType.curved, ZeroButtonGroupStyle? style, ZeroButtonGroupCallback? onChanged})
ButtonGroup having items with icons only
const
ZeroButtonGroup.labelsOnly({Key? key, required List<String>? labels, required List<bool> selecteds, IconData? selectIcon, bool withIcon = false, ButtonGroupType buttonGroupType = ButtonGroupType.filled, ZeroSizeType buttonSizeType = ZeroSizeType.medium, bool? vertical = false, bool? multipleSelect = false, ZeroButtonRadiusType buttonRadiusType = ZeroButtonRadiusType.curved, ZeroButtonGroupStyle? style, ZeroButtonGroupCallback? onChanged})
ButtonGroup having only items with labels
const
ZeroButtonGroup.labelsWithIcons({Key? key, required List<String>? labels, required List<IconData>? icons, required List<bool> selecteds, ButtonGroupType buttonGroupType = ButtonGroupType.filled, ZeroSizeType buttonSizeType = ZeroSizeType.medium, bool? vertical = false, bool? multipleSelect = false, ZeroButtonRadiusType buttonRadiusType = ZeroButtonRadiusType.curved, ZeroButtonGroupStyle? style, ZeroButtonGroupCallback? onChanged})
ButtonGroup having items with both labels and icons alike
const

Properties

buttonGroupType ButtonGroupType
Default (Solid), Outline, Text, Underline
final
buttonItemType ButtonItemType
Labels only, Icons only, Labels with Icons
final
buttonRadiusType ZeroButtonRadiusType
Rectangle, Curved, Rounded
final
buttonSizeType ZeroSizeType
Large, Medium, Small
final
hashCode int
The hash code for this object.
no setterinherited
icons List<IconData>?
List of IconData representing the icon of each button Example: [Icons.wheather, Icons.home, Icons.wallet]
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labels List<String>?
List of String representing the labels of each button Example: [Icons.wheather, Icons.home, Icons.wallet]
final
multipleSelect bool?
final
onChanged ZeroButtonGroupCallback?
The callback that is called when a button is tapped.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selecteds List<bool>
List of booleans representing the state of each button Example: [false, true, false] The number of elements must be the same as the number of either labels elements or icons elements
final
selectIcon IconData?
Required only when withIcon is true.
final
square bool?
Defaults to false which means it shapes rectangle, not sqare
final
style ZeroButtonGroupStyle?
Allows custom styles for this widget, by overriding global styles of ZeroThemeData.buttonGroupStyle
final
vertical bool?
final
withIcon bool
Whether or not the selected buton shows a leading icon indicating selection
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

Operators

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