ControlState
ControlState
enum has the following values:
DEFAULT
DISABLED
DRAGGED
ERROR
FOCUSED
HOVERED
PRESSED
SELECTED
SCROLLED_UNDER
Fallback state, meaning "all other states".
Usage example
To configure radio fill color for all Material states set fill_color
value to a literal, for example:
ft.Radio(fill_color=ft.Colors.GREEN)
To configure fill color for specific Material states set its value to a dictionary where the key is state name. For
example, to configure different fill colors for ControlState.HOVERED
and ControlState.FOCUSED
states and another
color for all other states:
ft.Radio(
fill_color={
ft.ControlState.HOVERED: ft.Colors.GREEN,
ft.ControlState.FOCUSED: ft.Colors.RED,
ft.ControlState.DEFAULT: ft.Colors.BLACK,
}
)