if on green if off red

This commit is contained in:
2025-06-12 13:39:47 +02:00
parent 6292a2b0ca
commit 15d008a06a

View File

@@ -54,6 +54,9 @@ class _MihToggleState extends State<MihToggle> {
value: widget.initialPostion,
trackOutlineColor: WidgetStateProperty.resolveWith<Color?>(
(states) {
if (widget.readOnly == true) {
return Colors.grey;
}
if (states.contains(WidgetState.selected)) {
return MzanziInnovationHub.of(context)!
.theme