Cannot focus on TextField in new page after navigating in Flutter

So the problem comes from the fact that I am supplying the GlobalKey to the Scaffold. Removing the key solves the issue. Not exactly sure why but the issue is mostly explained in this Github issue.

I was using the key to have snackbar popup when showing an error message when validating the input but now I'm opting to just display the error message in a Text widget.

in my case, autofocus:true doesn't work only on iOS simulator, but it will work in real device both for Android and iOS