I am making a navigation App, I am able to update the camera position according to the user location however I have no idea how to make the camera bearing follow the user from behind like in waze and google map navigation. I am using flutter and this code to update the camera on user position
mapController.animateCamera(CameraUpdate.newCameraPosition(CameraPosition(
target: LatLng(userposition.latitude,
userposition.longitude),
zoom: 18,
can anyone help me ?
I am planning to make the camera follow the user like this,

As much as I'd like to help you, I'm afraid trying to create/reproduce real-time navigation functionality using Google Maps API products could be against their Terms of Service.
As I am not a legal expert, it would be best to be in touch with one to review your use case if it is compliant with 3.2.3 Restrictions Against Misusing the Services, (d) No Re-Creating Google Products or Features:
If you are just looking into showing navigation instructions between two points, you can use the Directions actions of Maps URLs to achieve this. You can find more info on this here: https://developers.google.com/maps/documentation/urls/guide
There is no publicly available navigation API at this time. However, as I've mentioned on my comment on your question, Google is currently offering an industry solution, targeted to ridesharing verticals. For more info, you need to contact the sales department.
You can find more info on the ride sharing offering, as well as a link to the Sales form, here: https://cloud.google.com/maps-platform/ridesharing/