Here is the English translation:
title: StatusBarPlugin
category:
- Plugin
tag: - status-bar
The StatusBarPlugin interface represents the system status bar element and provides access to the properties and methods of the system status bar
import { statusBarPlugin } from "@plaoc/plugins";
// Set status bar color
statusBarPlugin.setColor("#FF0000FF")
Properties
The state object of the system status bar;
The property value is an object implementing the StateObserver interface;
Methods
Get the color [background color] of the system status bar;
Check if the system status bar overlaps the APP content;
StatusBarPlugin.getState([force_update])
Get the state of the system status bar;
Get the style [foreground color] of the system status bar;
Check if the system status bar is visible;
Returns a Promise object that resolves to a boolean;Hide the system status bar;
Set the color of the system status bar;
Set whether the system status bar overlaps the APP;
Set the state of the system status bar;
StatusBarPlugin.setStateByKey()
Set the value of a state in the system status bar;
Set the style of the system status bar;
Set whether the system status bar is visible;
Show the system status bar;
Events
- None
Platform Compatibility
Properties/Methods/Events | Android | iOS | Desktop-Dev | Desktop |
---|---|---|---|---|
state | ✅ | ✅ | ✅ | X |
getColor | ✅ | ✅ | ✅ | X |
getOverlay | ✅ | ✅ | ✅ | X |
getState | ✅ | ✅ | ✅ | X |
getStyle | ✅ | ✅ | ✅ | X |
getVisible | ✅ | ✅ | ✅ | X |
hide | ✅ | ✅ | ✅ | X |
setColor | ✅ | ✅ | ✅ | X |
setOverlay | ✅ | ✅ | ✅ | X |
setState | ✅ | ✅ | ✅ | X |
setStateByKey | ✅ | ✅ | ✅ | X |
setStyle | ✅ | ✅ | ✅ | X |
setVisible | ✅ | ✅ | ✅ | X |
show | ✅ | ✅ | ✅ | X |