Flutter — How to deal with unwanted widget build

The build method is designed in such a way that it should be pure/without side effects. This is because many external factors can trigger a new widget build, such as:

Flutter Developer
2 min readSep 13, 2021

--

  • Route pop/push
  • Screen resize, usually due to keyboard appearance or orientation…

--

--