在地图上显示定位 second commit

main
zhuce 2024-03-16 18:17:51 +08:00
parent ee11c80e9f
commit ab3b79c5aa
1 changed files with 1 additions and 4 deletions

View File

@ -85,12 +85,8 @@ class _MapWidgetState extends State<MapWidget> {
_locationResult = result;
});
print("location=$_locationResult");
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
_moveCamera(_locationResult);
});
});
_locationPlugin.startLocation();
}
@override
@ -112,6 +108,7 @@ class _MapWidgetState extends State<MapWidget> {
_mapController = controller;
getApprovalNumber();
});
_mapController.moveCamera(CameraUpdate.newCameraPosition(CameraPosition(target: LatLng(29.52,121.31))));
},
);
return Expanded(