For first time google maps flutter ,loads perfect but when hot restart it , it goes to platform exception
google_maps_flutter: ^0.5.21+15
Github [google_maps_fl
According to the API,
Do not change the camera with this camera update until the map has undergone layout (in order for this method to correctly determine the appropriate bounding box and zoom level, the map must have a size). Otherwise an IllegalStateException will be thrown.
I had the same issue and after some debugging, it looks like whenever you hotreload while the map is in view, it will give the error.
But you can prevent the error if you hot reload after disposing the map.
In other words, it is there to prevent multiple instances of maps to be active.
So I would suggest to dispose the map before hot reload while in development.
In a production version, users won't be able to hot reload thus, they won't encounter the platform issue.