Srikrishna
07/29/2023, 10:42 PM@Composable
fun AllComposableFunctions() {
TestWidget().Content()
}
To
@Composable
fun AllComposableFunctions() {
remember { TestWidget() }.Content()
}
Basically TestWidget is a flutter style stateful widget. Since compose functions will be called multiple times, first function new object each time function runs. Wrapping object creation with remember solves the problem. but I want to do it via compiler plugin, so that code looks elegant. Please advice where should i start and right materials to followxoangon
07/30/2023, 9:08 AMChrimaeon
07/30/2023, 11:40 AMSrikrishna
07/31/2023, 4:46 PM