RadioButton
Radio Button is a material widget that is used as an option button where the user can select only one option from a group of options.
We can use it in cases where the user has to select a single value from a set of values. If one radio button is selected then we cannot select the other radio buttons in the same group. we are taking an example of gender selection.
title: It is used to specify the radio button label.
groupValue: It is used to specify the currently selected item for the radio button group.
value: It specifies the backhand value, which is represented by a radio button.
onChanged: It will be called whenever the user selects the radio button.
ThemeData:
You want to change the theme and give primary color and swatch color as a theme it will be used in the whole application.
activeColor:
When you select the radio button at that time color shows which is defined in the activeColor property.
tileColor:
This property is used to set the background color of your ListTile.
contentPadding:
As per the name this property is used to set the padding of content.
subtitle:
This property is used when you need to show some text on basis of the title or you want to specify some condition based on that you can select the radio button. Let's take an example of Voting and give two values with subtitles:
CheckBox
value: This property takes in a boolean value as the object to determine whether the CheckBox is checked or not.
onChanged: ValueChanged<T> typedef is the object given to this property. It is called when the value in the CheckBox widget should be changed.
activeColor:
When you select the checkbox at that time color shows which is defined in activeColor property.
Tristate:
It is false, by default. Its value can also be true, false, or null.
checkColor:
It specified the color of the check icon when they are selected.
Comments
Post a Comment