Side Bar
pub fn side_bar_provider(
args: SideBarProviderArgs,
state: Arc<RwLock<SideBarProviderState>>,
main_content: impl FnOnce() + Send + Sync + 'static,
side_bar_content: impl FnOnce() + Send + Sync + 'static,
)The side_bar_provider is used to create a side-docked dialog in an application.
Arguments
args: SideBarProviderArgsThis argument configures the dialog's style. Notably,
side_bar_providersupports both glass and non-glass variants. You can configure it via thestyle: SideBarStylefield ofSideBarProviderArgs. The default isSideBarStyle::Material(non-glass).state: Arc<RwLock<SideBarProviderState>>Manages the dialog state, including whether the sidebar is open and the animation progress.
Use its
open()andclose()methods to programmatically open and close the dialog.main_content: impl FnOnce() + Send + Sync + 'staticA closure that renders the main content — the content below the dialog.
side_bar_content: impl FnOnce() + Send + Sync + 'staticA closure that renders the side dialog content.