Back to posts Edit this post
Copy content

10 Apr 10:43

Button( modifier = Modifier.weight(2f), onClick = { validationError = !validateInput(name, description) if (!validationError) onSave( // We create the Task object here but it could be done // in the onSave lambda based on the input Task( name = name, description = description, isImportant = isImportant, isCompleted = task?.isCompleted ?: false, taskId = task?.taskId ?: System.currentTimeMillis() ) ) }) {

No files