fillColor property
The color that fills the checkbox, in all MaterialStates.
Resolves in the following states:
{@tool snippet}
This example resolves the fillColor based on the current MaterialState
of the Checkbox, providing a different Color
when it is
MaterialState.disabled.
Checkbox(
value: true,
onChanged: (_){},
fillColor: MaterialStateProperty.resolveWith<Color>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) {
return Colors.orange.withOpacity(.32);
}
return Colors.orange;
})
)
{@end-tool}
Implementation
final MaterialStateProperty<Color?>? fillColor;