MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / getNativeValue

Function getNativeValue

apps/automated/src/ui/switch/switch-tests.ts:138–146  ·  view source on GitHub ↗
(mySwitch: Switch)

Source from the content-addressed store, hash-verified

136}
137
138function 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
148function setNativeValue(mySwitch: Switch, value: boolean) {
149 if (__ANDROID__) {

Callers 1

testActionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected