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

Function setBoolean

packages/core/application-settings/index.android.ts:75–85  ·  view source on GitHub ↗
(key: string, value: boolean)

Source from the content-addressed store, hash-verified

73
74// setters
75export function setBoolean(key: string, value: boolean): void {
76 if (!verify(key)) {
77 return;
78 }
79 if (!common.ensureValidValue(value, 'boolean')) {
80 return;
81 }
82 const editor = sharedPreferences.edit();
83 editor.putBoolean(key, value);
84 editor.apply();
85}
86
87export function setString(key: string, value: string): void {
88 if (!verify(key)) {

Callers

nothing calls this directly

Calls 3

verifyFunction · 0.85
editMethod · 0.45
applyMethod · 0.45

Tested by

no test coverage detected