crea_radio_button 0.1.1 crea_radio_button: ^0.1.1 copied to clipboard
A simple radio button group, that allow to choose only one option, but can have any amount of elements. Allows rectangular and round buttons, vertical and horizontal.
A package to create simple radio buttons.
Features #
Render a radio button group:
- with any number of buttons
- vertical or horizontal
- square or round
Upcoming features #
- pass Object as an option
Limitations #
Currently only supports String as value and button label. An option for RadioGroup is passe via class RadioOption.
Getting started #
To use this plugin, add crea_radio_button as a dependency in your pubspec.yaml file.
Usage #
String radioButtonInput = "";
RadioButtonGroup(
vertical: true,
options: [
RadioOption("1", "1"),
RadioOption("2", "2"),
RadioOption("3", "3")
],
buttonHeight: 50,
buttonWidth: 50,
defaultIdx: defaultRadioIdx,
callback: (val) {
setState(() {
radioButtonInput = val.text;
});
});
Example #
Additional information #
Contribute here: https://github.com/dutkaD/crea_radio