It would be cool if you can use a future instead of the boolean condition.
for example if we made an API call using a future, the loading_overlay will be only visible until the future method is ready or finish.
A simple fix will be to set your loading variable in the state to true before starting your Future and then setting it to false or navigating to your desired page when the future completes.
It would be cool if you can use a future instead of the boolean condition. for example if we made an API call using a future, the loading_overlay will be only visible until the future method is ready or finish.