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?
Use
flexible
as child of scaffold. OrContainer()
with height and width =MediaQuery.of(context).size.height
and ...width
respectively.