ZeroButtonGroup class
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 setter inherited
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.
final inherited
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 setter inherited
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