Code 👇
@Composable
fun TaskItemCard(task: Task, onTap: () -> Unit, onDoubleTap: () -> Unit, onLongPress: () -> Unit) {
// Emoji + (title + category)
Row(
modifier = Modifier
.fillMaxWidth()
.pointerInput(Unit) {
detectTapGestures(
onDoubleTap = { onDoubleTap() }, // complete the task
onLongPress = { onLongPress() }, // show bottom sheet
onTap = { onTap() } // it will goto details screen
)
},
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.Start
) {
// Emoji Text View
EmojiTextView(emoji = task.emoji)
}}