Skip to main content

StateObserver

BFChainInterfaceStateObserverLess than 1 minute

The StateObserver interface is a basic listening interface that monitors the Plugin state;
This interface is an internal interface. To get a specific instance, please access it through the Plugin.state property

import { statusBarPlugin } from "@plaoc/plugins";

statusBarPlugin.state.onChange((info) => {
  // 当 state 发生变化的时候调用
})

Property

  • StateObserver.currentState

    the current state object;
    The value of the property is a State object;
    The acquisition and setting of the state can be achieved through currentState; [Generally speaking, do not manually set the attribute value of currentState, this value will be automatically updated]
    The property value is undefined until the initial update is complete

Method

Event

  • none

Platform Compatibility

Property/Method/EventAndroidIOSDesktop-DevDesktop
currentStateX
jsonlinesX
stopObserveX
onChangeX
getStateX

Plugin

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