if on green if off red
This commit is contained in:
@@ -54,6 +54,9 @@ class _MihToggleState extends State<MihToggle> {
|
|||||||
value: widget.initialPostion,
|
value: widget.initialPostion,
|
||||||
trackOutlineColor: WidgetStateProperty.resolveWith<Color?>(
|
trackOutlineColor: WidgetStateProperty.resolveWith<Color?>(
|
||||||
(states) {
|
(states) {
|
||||||
|
if (widget.readOnly == true) {
|
||||||
|
return Colors.grey;
|
||||||
|
}
|
||||||
if (states.contains(WidgetState.selected)) {
|
if (states.contains(WidgetState.selected)) {
|
||||||
return MzanziInnovationHub.of(context)!
|
return MzanziInnovationHub.of(context)!
|
||||||
.theme
|
.theme
|
||||||
|
|||||||
Reference in New Issue
Block a user