'Flutter Web resize browser-window leads to a defunct context
I made a web-app with flutter and there are bar-charts. I want to refresh them if the screen size changes. This works fine if I switch between the browser window option "shrink" and "enlarge". But if I use the arrows to manually change th size of the window I get this error:
"The widget has been unmounted, so the State no longer has a context..."
Does anyone knows why this appears?
Solution 1:[1]
Use flexible as child of scaffold. Or Container() with height and width = MediaQuery.of(context).size.height and ...width respectively.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Delwinn |
