(mySwitch: Switch)
| 136 | } |
| 137 | |
| 138 | function getNativeValue(mySwitch: Switch): boolean { |
| 139 | if (__ANDROID__) { |
| 140 | const nativeView: android.widget.Switch = mySwitch.nativeViewProtected; |
| 141 | |
| 142 | return nativeView.isChecked(); |
| 143 | } else if (mySwitch.ios) { |
| 144 | return mySwitch.ios.on; |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | function setNativeValue(mySwitch: Switch, value: boolean) { |
| 149 | if (__ANDROID__) { |