A Flutter package that provides some customizable widgets.
import 'package:uk_custom_widget/uk_custom_checkbox.dart';
CustomCheckbox(
value: isChecked,
onChanged: (val) {
setState(() {
isChecked = val;
});
},
)
| Props |
Description |
Default |
Type |
value |
This is used for give the radio button a value |
Required |
Boolean |
activeColor |
This is the selected checkbox color |
Blue |
Colors |
size |
This is the checkbox size |
24.0 |
Double |
borderRadius |
This is the border radius for checkbox |
4 |
BorderRadius |
| Props |
Description |
onChanged |
This callback function is used when you click on Checkbox. It returns boolean value |
import 'package:uk_custom_widget/uk_custom_radio_button.dart';
String selectedValue = 'option1';
CustomRadioButton<String>(
value: 'option1',
groupValue: selectedValue,
activeColor: Colors.red,
onChanged: (val) {
setState(() {
selectedValue = val;
});
},
label: 'Option 1',
labelStyle: const TextStyle(
color: Color.fromARGB(255, 26, 25, 25),
fontSize: 20,
),
),
| Props |
Description |
Default |
Type |
value |
This is used for give the radio button a value |
Required |
Generic |
groupValue |
This is the selected value of the radio button. |
Required |
Generic |
activeColor |
This is the selected radio button color |
Blue |
Colors |
label |
This is the label for the radio button |
Required |
string |
labelStyle |
This is the label style for the radio button |
Optional |
TextStyle |
| Props |
Description |
onChanged |
This callback function is used when you click on RadioButton. It returns selected value |