Created
October 25, 2022 18:25
-
-
Save Astroa7m/b967b5a353e4ea9cec3af980c28851f9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun DetailsScreen( | |
modifier: Modifier = Modifier, | |
user: User?, | |
onDismiss: () -> Unit, | |
onSharing: () -> Unit, | |
onAddNewUserClicked: () -> Unit | |
) { | |
if (user == null) | |
UserNotFoundDialog( | |
onAddNewUserClicked = onAddNewUserClicked, | |
onDismiss = onDismiss | |
) | |
else { | |
Column( | |
modifier = modifier.scrollable(rememberScrollState(), Orientation.Vertical), | |
horizontalAlignment = Alignment.CenterHorizontally, | |
) { | |
UserItem( | |
user = user | |
) | |
Spacer(modifier = Modifier.height(16.dp)) | |
// here | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) | |
SharingUtil.CheckIfAppApprovedForDomain() | |
IconButton(onClick = { onSharing() }) { | |
Icon(imageVector = Icons.Rounded.Share, contentDescription = null) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment