fillColor property
final
The color that fills the radio button, in all WidgetStates.
Resolves in the following states:
This example resolves the fillColor based on the current WidgetState
of the Radio, providing a different
link
Color
when it is
WidgetState.disabled.
Radio<int>(
value: 1,
groupValue: 1,
onChanged: (_){},
fillColor: WidgetStateProperty.resolveWith<Color>((Set<WidgetState> states) {
if (states.contains(WidgetState.disabled)) {
return Colors.orange.withOpacity(.32);
}
return Colors.orange;
})
)
If specified, overrides the default value of Radio.fillColor.
Implementation
final MaterialStateProperty<Color?>? fillColor;