setToolbarItemsProvider

Customizes the main-toolbar items declaratively — the Compose-toolbar replacement for overriding onCreateOptionsMenu / onPrepareOptionsMenu. The provider receives the SDK's default items and returns the items to show (add custom items, drop or reorder defaults, or copy an item with updated state). Pass null to clear it.

Parameters

provider

the items provider, or null to use the SDK defaults unchanged.