docs: add README.md and update form submission logic
All checks were successful
Build / build (pull_request) Successful in 6m56s

This commit updates the README.md with project details, including features, technologies, installation instructions, and project structure.
- It also includes a description of the app, features like free-text input, sentiment selection, submitting content to a server, and displaying a Snackbar.
- It updates the form submission logic in `App.kt` to delay showing the "Feedback sent" Snackbar by 1 second.
This commit is contained in:
Ben Martin 2025-01-21 14:47:53 +00:00
parent 063ec7632f
commit 54ffa5d4cf
No known key found for this signature in database
GPG key ID: 11936493893207E4
2 changed files with 40 additions and 11 deletions

View file

@ -31,6 +31,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import org.jetbrains.compose.ui.tooling.preview.Preview
@ -85,7 +86,10 @@ fun App() {
Button(onClick = {
sentiment.value = Sentiment.HAPPY
comment = TextFieldValue("")
scope.launch { scaffoldState.snackbarHostState.showSnackbar("Feedback sent") }
scope.launch {
delay(1000)
scaffoldState.snackbarHostState.showSnackbar("Feedback sent")
}
}, modifier = Modifier.padding(8.dp)) {
Icon(Icons.AutoMirrored.Filled.Send, contentDescription = "Send")
}