Adriano Celentano
10/14/2020, 2:33 PM@Composable
fun TodoItemInput(onItemComplete: (TodoItem) -> Unit) {
// onItemComplete is an event will fire when an item is completed by the user
Column {
Row(Modifier
.padding(horizontal = 16.dp)
.padding(top = 16.dp)
) {
TodoInputTextField(Modifier
.weight(1f)
.padding(end = 8.dp)
)
TodoEditButton(
onClick = { /* todo */ },
text = "Add",
modifier = Modifier.align(Alignment.CenterVertically)
)
}
}
}
my app does not compile anymore
w: ATTENTION!
This build uses unsafe internal compiler arguments:
-XXLanguage:+NonParenthesizedAnnotationsOnFunctionalTypes
This mode is not recommended for production use,
as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!
e: warnings found and -Werror specified
w: /Users/adrian/Workspace/Android/android-compose-codelabs-main/StateCodelab/start/src/main/java/com/codelabs/state/todo/TodoScreen.kt: (84, 19): Parameter 'onItemComplete' is never used
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':start:compileDebugKotlin'.
> Compilation error. See log for more details
Se7eN
10/14/2020, 4:08 PMAdriano Celentano
10/14/2020, 6:00 PMSe7eN
10/15/2020, 6:32 AMnickbutcher
10/15/2020, 8:12 AMallWarningsAsErrors
as it helps stop warnings creep into a project: https://github.com/googlecodelabs/android-compose-codelabs/blob/main/StateCodelab/start/build.gradle#L38
cc/ @Sean McQuillan [G]Sean McQuillan [G]
10/15/2020, 6:41 PMAdriano Celentano
10/15/2020, 9:14 PM