GoogleButtonUiContainer

fun GoogleButtonUiContainer(modifier: Modifier = Modifier, onGoogleSignInResult: (GoogleUser?) -> Unit, content: @Composable UiContainerScope.() -> Unit)

GoogleButton Ui Container Composable that handles all sign-in functionality. Make sure you create GoogleAuthUiProvider instance using GoogleAuthProvider.create before invoking below composable function.

Child of this Composable can be any view or Composable function. You need to call UiContainerScope.onClick function on your child view's click function.

onGoogleSignInResult callback will return GoogleUser or null if sign-in was unsuccessful.

Example Usage:

//Google Sign-In with Custom Button and authentication without Firebase
GoogleButtonUiContainer(onGoogleSignInResult = { googleUser ->
val idToken = googleUser?.idToken // Send this idToken to your backend to verify
}) {
Button(onClick = { this.onClick() }) { Text("Google Sign-In(Custom Design)") }
}