Many #Flutter developers are writing the "logic" code inside the build() method. The SDK does it as well. Is it the same as how we use JS to modify CSS and DOM elements? Is it imperative? I think what I'm building will fix this.
@millergodev build() methods should only build, nothing else. Any logic goes into controllers. Can you point me out to where the SDK does that instead?
@millergodev What are you building? To what logic are you referring?
@millergodev Many flutter total novices arr writing…* Here ya go fixed If the third month you are learning flutter u still putting stuff in build method, it means u didn’t want to learn it, just wanted to hack some stuff together sticking chat gpt copied code
@millergodev Anything requiring context for lookups like visual properties vs theming properties getting resolved live in the build method.
@millergodev I agree, this isn’t the best practice, the business logic & UI logic should be separated otherwise it’ll be a big mass. In my Flutter projects I’m using a separate Controller class to handle these logics, on UI side I’m just calling controller’s method it’s way cleaner.
@millergodev That's a bad practice I believe. In build methods, I have only Widgets and their constructor calls. Nothing else.