Srikrishna
07/31/2023, 4:47 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 follow