ivano
04/11/2023, 3:39 PMCanvas
calculations and so i need size
. To clean things up i created a viewModel and passed a viewModel.setValueAsWasUglyWIthTheAdapters(size:Float)
and in the viewModel I have a property that get the value and use it everywhere( Is not a flow because the size is not reactive. But I feel really bad, this is bad architecture, even because I do not want to pass the ViewModel in the composable, that should be stateless 100%. `What is the UncleBobbest
way to proceed when you need to perform heavy weight calculations from variable that come only in the view? Maybe untestable extension functions instead of the VM, or am I missing a design pattern dedicated?Joel Denke
04/11/2023, 3:53 PMivano
04/11/2023, 4:33 PMflutterish
to make a kind of state machine, I am doing a proof of concept for a library i am writing, is the fact that I would move to the the vm ONLY events
and NOT
a view internal, otherwise would look as a MVC
old architectureivano
04/11/2023, 4:36 PMLandry Norris
04/11/2023, 5:02 PMJoel Denke
04/11/2023, 5:10 PMivano
04/11/2023, 7:06 PM