NavigationBarPlugin
The NavigationBarPlugin interface represents the system navigation bar and provides access to its properties and methods.
import { navigationBarPlugin } from "@plaoc/plugins";
// Set navigation bar color
navigationBarPlugin.setColor("#FF0000FF")
Properties
The state object of the system navigation bar;
The value is an object implementing the StateObserver interface;
Methods
NavigationBarPlugin.getColor()
Get the background color of the system navigation bar;
NavigationBarPlugin.getOverlay()
Check if the system navigation bar overlays app content;
NavigationBarPlugin.getState([force_update])
Get the state of the system navigation bar;
NavigationBarPlugin.getStyle()
Get the style of the system navigation bar;
NavigationBarPlugin.getVisible()
Check if the system navigation bar is visible;
Returns a Promise resolving to a boolean;Hide the system navigation bar;
NavigationBarPlugin.setColor()
Set the color of the system navigation bar;
NavigationBarPlugin.setOverlay()
Set whether the system navigation bar overlays app content;
NavigationBarPlugin.setState()
Set the state of the system navigation bar;
NavigationBarPlugin.setStateByKey()
Set a specific state value of the system navigation bar;
NavigationBarPlugin.setStyle()
Set the style of the system navigation bar;
NavigationBarPlugin.setVisible()
Set whether the system navigation bar is visible;
Show the system navigation bar;
Events
- None
Platform Support
| Property/Method/Event | 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 |