StateObserver.getState()
PluginStateObservergetStateLess than 1 minute
Get the status value of the plugin
StateObserver.getState([force_update])
参数
force_update
The parameter accepts a boolean type of data; whether it is necessary to force the status to be updated;
force_update === true will re-read status updates from the system;
force_update === false will return the last cached state data;
返回值
A Promise object, resolve fulfills an object that implements part of the State interface;
Example
import { statusBarPlugin } from "@plaoc/plugins";
const value = statusBarPlugin.state.getState(true)
Platform Compatibility
Property/Method/Event | Android | IOS | Desktop-Dev | Desktop |
---|---|---|---|---|
getState | ✅ | ✅ | ✅ | X |
Related Links
Powered by Waline v2.15.7