0 purchases
toggle button list
toggle_button_list #
Create custom toggle button list
Installation #
pubspec.yaml :
dependencies :
toggle_button_list: ^0.0.2
copied to clipboard
Example #
Basic #
ToggleButtonList(items: ["Furkan", "Burak", "Yusuf", "Mami"],activeColor: Colors.green, defaultColor: Colors.black12);
copied to clipboard
Add horizontal list #
listType: ListType.Horizontal
ToggleButtonList(items: ["Furkan", "Burak", "Yusuf", "Mami"],activeColor: Colors.green, defaultColor: Colors.black12,listType: ListType.Horizontal);
copied to clipboard
Add vertical list #
listType: ListType.Vertical
ToggleButtonList(items: ["Furkan", "Burak", "Yusuf", "Mami"],activeColor: Colors.green, defaultColor: Colors.black12,listType: ListType.Vertical);
copied to clipboard
Set default index #
selectedIndex: (number)
ToggleButtonList(items: ["Furkan", "Burak", "Yusuf", "Mami"],activeColor: Colors.green, defaultColor: Colors.black12,selectedIndex: 2);
copied to clipboard
OnTap event #
onTap: (selectedIndex)
ToggleButtonList(items: ["Furkan", "Burak", "Yusuf", "Mami"],activeColor: Colors.green, defaultColor: Colors.black12,listType: ListType.Horizontal, onTap: (selected) {
this.setState(() {
print(selected);
});
});
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.