Repository: android/compose-samples
File: Jetsurvey/app/src/main/java/com/example/compose/jetsurvey/survey/SurveyQuestions.kt (Kotlin)

Code before:
                R.string.captain_planet
            )
        )
    )
    JetsurveyTheme {
        Question(question = question, answer = null, onAnswer = {}, onAction = { _, _ -> })
    }
}

@Composable
fun Question(
    question: Question,
    answer: Answer<*>?,
    onAnswer: (Answer<*>) -> Unit,
    onAction: (Int, SurveyActionType) -> Unit,
    modifier: Modifier = Modifier
) {
    ScrollableColumn(
        modifier = modifier,
        contentPadding = PaddingValues(start = 20.dp, end = 20.dp)
    ) {
        Spacer(modifier = Modifier.preferredHeight(44.dp))
        Row(
            modifier = Modifier.fillMaxWidth().background(
                color = MaterialTheme.colors.questionBackground,
                shape = RoundedCornerShape(12.dp)
            )
        ) {
            ProvideEmphasis(emphasis = AmbientEmphasisLevels.current.high) {
                Text(
                    text = stringResource(id = question.questionText),
                    style = MaterialTheme.typography.subtitle1,
                    modifier = Modifier.fillMaxWidth().padding(vertical = 24.dp, horizontal = 16.dp)
                )
            }
        }
        Spacer(modifier = Modifier.preferredHeight(24.dp))
        when (question.answer) {
            is PossibleAnswer.SingleChoice -> SingleChoiceQuestion(
                possibleAnswer = question.answer,
                answer = answer as Answer.SingleChoice?,
                onAnswerSelected = { answer -> onAnswer(Answer.SingleChoice(answer)) },
                modifier = Modifier.fillMaxWidth()
            )
            is PossibleAnswer.MultipleChoice -> MultipleChoiceQuestion(
                possibleAnswer = question.answer,
                answer = answer as Answer.MultipleChoice?,
                onAnswerSelected = { newAnswer, selected ->
                    // create the answer if it doesn't exist or
                    // update it based on the user's selection
                    if (answer == null) {

Review comment (suggestion):
Use a theme shape?
```suggestion
                shape = MaterialTheme.shapes.small
```

Code after:
            )
        )
    )
    JetsurveyTheme {
        Question(question = question, answer = null, onAnswer = {}, onAction = { _, _ -> })
    }
}

@Composable
fun Question(
    question: Question,
    answer: Answer<*>?,
    onAnswer: (Answer<*>) -> Unit,
    onAction: (Int, SurveyActionType) -> Unit,
    modifier: Modifier = Modifier
) {
    ScrollableColumn(
        modifier = modifier,
        contentPadding = PaddingValues(start = 20.dp, end = 20.dp)
    ) {
        Spacer(modifier = Modifier.preferredHeight(44.dp))
        Row(
            modifier = Modifier.fillMaxWidth().background(
                color = MaterialTheme.colors.questionBackground,
                shape = MaterialTheme.shapes.small
            )
        ) {
            ProvideEmphasis(emphasis = AmbientEmphasisLevels.current.high) {
                Text(
                    text = stringResource(id = question.questionText),
                    style = MaterialTheme.typography.subtitle1,
                    modifier = Modifier.fillMaxWidth().padding(vertical = 24.dp, horizontal = 16.dp)
                )
            }
        }
        Spacer(modifier = Modifier.preferredHeight(24.dp))
        when (question.answer) {
            is PossibleAnswer.SingleChoice -> SingleChoiceQuestion(
                possibleAnswer = question.answer,
                answer = answer as Answer.SingleChoice?,
                onAnswerSelected = { answer -> onAnswer(Answer.SingleChoice(answer)) },
                modifier = Modifier.fillMaxWidth()
            )
            is PossibleAnswer.MultipleChoice -> MultipleChoiceQuestion(
                possibleAnswer = question.answer,
                answer = answer as Answer.MultipleChoice?,
                onAnswerSelected = { newAnswer, selected ->
                    // create the answer if it doesn't exist or
                    // update it based on the user's selection
                    if (answer == null) {
                        onAnswer(Answer.MultipleChoice(setOf(newAnswer)))