Skip to main content

StateObserver.getState()

BFChainPluginStateObservergetStateLess 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/EventAndroidIOSDesktop-DevDesktop
getStateX

StateObserver

Comments
  • Latest
  • Oldest
  • Hottest
Powered by Waline v2.15.7