GroupSubscriptionSheet

fun GroupSubscriptionSheet(modifier: Modifier = Modifier, state: GroupSubscriptionSheetState = rememberGroupSubscriptionSheetState(), accessTokenProvider: () -> String? = null, groupId: String, onSuccess: () -> Unit, onFail: (VKIDGroupSubscriptionFail) -> Unit = {}, snackbarHostState: SnackbarHostState? = null, style: GroupSubscriptionStyle = GroupSubscriptionStyle.Light())

A bottomsheet that provides Group Subscription functionality.

Launches VK group subscription flow.

Since

2.5.0

Parameters

modifier

Modifier for the widget, most likely should not be changed.

state

Sheet state, can be used for showing and hiding the sheet.

accessTokenProvider

The function that provides an access token that will be used for retrieving group information and subscribing the user. NOTE: The token must have "groups" scope, otherwise you'll get an error. NOTE: The token won't be automatically refreshed, in case it's outdated you'll get an error. NOTE: In case you will pass null, the last token you received with the SDK will be used.

groupId

The id of the group the user will be subscribed to.

onSuccess

Will be called upon successful subscription.

onFail

Will be called upon any unsuccessful flow completion along with an description of the specific encountered error.

snackbarHostState

The host state, should be the same as GroupSubscriptionSnackbarHost. NOTE: In case you pass null, the host will be put in the place you put this Composable.

style

The widget style, can change appearance.