-
-
Save Arunshaik2001/bc874b555e503417130c141e11ba8695 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
Button(onClick = { | |
val result = validateData( | |
titleInputValue, | |
descriptionInputValue, | |
titleError, | |
descriptionError, | |
localDateTime, | |
mContext | |
) | |
if (!result) { | |
return@Button | |
} | |
val title = titleInputValue.value.text | |
val description = descriptionInputValue.value.text | |
val startTimeInMillis = | |
localDateTime!!.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli() | |
val reminderType = remindTypeState.value.toString() | |
val intent = Intent() | |
intent.action = Intent.ACTION_SEND | |
intent.data = | |
Uri.parse("remindme://reminder?title=${title}&description=${description}&startTimeInMillis=${startTimeInMillis}&reminderType=${reminderType}") | |
mContext.startActivity(intent) | |
}) { | |
Text(text = "Set Reminder") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment