fillColor property
The color that fills the radio button, in all MaterialStates.
Resolves in the following states:
{@tool snippet}
This example resolves the fillColor based on the current MaterialState
of the Radio, providing a different Color
when it is
MaterialState.disabled.
Radio<int>(
value: 1,
groupValue: 1,
onChanged: (_){},
fillColor: MaterialStateProperty.resolveWith<Color>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) {
return Colors.orange.withOpacity(.32);
}
return Colors.orange;
})
)
{@end-tool}
If null, then the value of activeColor is used in the selected state. If
that is also null, then the value of RadioThemeData.fillColor is used.
If that is also null, then ThemeData.disabledColor is used in
the disabled state, ThemeData.toggleableActiveColor
is used in the
selected state, and ThemeData.unselectedWidgetColor is used in the
default state.
Implementation
final MaterialStateProperty<Color?>? fillColor;