if on green if off red
This commit is contained in:
parent
6292a2b0ca
commit
15d008a06a
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue