The getter 'rotation' isn't defined for the type 'MapPosition'. Try importing the library that defines 'rotation', correcting the name to the name of an existing getter, or defining a getter or field named 'rotation'
code is here below
MapOptions(
center: _initialcameraposition,
zoom: 13.0,
onPositionChanged: (MapPosition position, bool hasGesture) {
setState(() {
_targetcameraposition = position.center!;
_rotation = position.rotation;
});
},
)