toggleFavoriteStatus

fun toggleFavoriteStatus(context: Context?, statusChangedCallback: (newStatus: Boolean?) -> Unit? = null)(source)

Toggles the favorite status of an item.

Parameters

context

The context to use.

statusChangedCallback

A callback that is invoked when the favorite status changes. It provides the new favorite status (true if added to favorites, false if removed, null if action was canceled).