Created
March 15, 2019 19:54
-
-
Save kenzieschmoll/75db39377331a1e0f0e59268fc8f3063 to your computer and use it in GitHub Desktop.
Maps Sample V2 - add onAddmarkerButtonPressed() pt 2 - track camera position
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LatLng _lastMapPosition = _center; | |
void _onCameraMove(CameraPosition position) { | |
_lastMapPosition = position.target; | |
} | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
... | |
GoogleMap( | |
... | |
onCameraMove: _onCameraMove, | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment