You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If true the user won't be able to toggle the switch.
62
62
63
63
| Type | Default |
64
-
|----|-------|
64
+
|------|---------|
65
65
| bool |`false`|
66
66
67
67
---
@@ -71,7 +71,7 @@ If true the user won't be able to toggle the switch.
71
71
On iOS, custom color for the background. This background color can be seen either when the switch value is `false` or when the switch is disabled (and the switch is translucent).
72
72
73
73
| Type |
74
-
|------------------|
74
+
|--------------------|
75
75
|[color](colors.md)|
76
76
77
77
---
@@ -81,7 +81,7 @@ On iOS, custom color for the background. This background color can be seen eithe
81
81
Invoked when the user tries to change the value of the switch. Receives the change event as an argument. If you want to only receive the new value, use `onValueChange` instead.
82
82
83
83
| Type |
84
-
|--------|
84
+
|----------|
85
85
| function |
86
86
87
87
---
@@ -91,7 +91,7 @@ Invoked when the user tries to change the value of the switch. Receives the chan
91
91
Invoked when the user tries to change the value of the switch. Receives the new value as an argument. If you want to instead receive an event, use `onChange`.
92
92
93
93
| Type |
94
-
|--------|
94
+
|----------|
95
95
| function |
96
96
97
97
---
@@ -107,7 +107,7 @@ A ref setter that will be assigned an [element node](element-nodes) when mounted
107
107
Color of the foreground switch grip. If this is set on iOS, the switch grip will lose its drop shadow.
108
108
109
109
| Type |
110
-
|------------------|
110
+
|--------------------|
111
111
|[color](colors.md)|
112
112
113
113
---
@@ -117,7 +117,7 @@ Color of the foreground switch grip. If this is set on iOS, the switch grip will
117
117
Thumb color when the switch is off. Overrides `thumbColor` for the unchecked state.
118
118
119
119
| Type |
120
-
|------------------|
120
+
|--------------------|
121
121
|[color](colors.md)|
122
122
123
123
---
@@ -127,7 +127,7 @@ Thumb color when the switch is off. Overrides `thumbColor` for the unchecked sta
127
127
Thumb color when the switch is on. Overrides `thumbColor` for the checked state.
128
128
129
129
| Type |
130
-
|------------------|
130
+
|--------------------|
131
131
|[color](colors.md)|
132
132
133
133
---
@@ -136,8 +136,8 @@ Thumb color when the switch is on. Overrides `thumbColor` for the checked state.
136
136
137
137
Drawable resource name(s) to display as an icon inside the thumb. Accepts a `{false, true}` object (like `trackColor`) so each state can have a different icon. Omit a key to show no icon for that state. Requires Material Design 3 (MaterialSwitch).
@@ -147,7 +147,7 @@ Drawable resource name(s) to display as an icon inside the thumb. Accepts a `{fa
147
147
Color tint applied to the thumb icon.
148
148
149
149
| Type |
150
-
|------------------|
150
+
|--------------------|
151
151
|[color](colors.md)|
152
152
153
153
---
@@ -159,7 +159,7 @@ Custom colors for the switch track.
159
159
_iOS_: When the switch value is `false`, the track shrinks into the border. If you want to change the color of the background exposed by the shrunken track, use [`ios_backgroundColor`](switch.md#ios_backgroundColor).
0 commit comments