fillColor property
final
The color that fills the checkbox, in all WidgetStates.
Resolves in the following states:
This example resolves the fillColor based on the current WidgetState
of the Checkbox, providing a different
link
Color
when it is
WidgetState.disabled.
Checkbox(
value: true,
onChanged: (_){},
fillColor: MaterialStateProperty.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 Checkbox.fillColor.
Implementation
final MaterialStateProperty<Color?>? fillColor;