-
-
Save Aditsyal/e5115389fd70f6d5628c25a25f88a1d0 to your computer and use it in GitHub Desktop.
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
CameraPosition _initialPosition = CameraPosition(target: LatLng(26.8206, 30.8025)); | |
Completer<GoogleMapController> _controller = Completer(); | |
void _onMapCreated(GoogleMapController controller) { | |
_controller.complete(controller); | |
} | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text('Maps in Flutter'), | |
centerTitle: true, | |
), | |
body: Stack( | |
children: <Widget>[ | |
GoogleMap( | |
onMapCreated: _onMapCreated, | |
initialCameraPosition: _initialPosition, | |
), | |
], | |
)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment