Skip to content

Instantly share code, notes, and snippets.

@Aditsyal
Last active April 10, 2019 13:01
Show Gist options
  • Save Aditsyal/e5115389fd70f6d5628c25a25f88a1d0 to your computer and use it in GitHub Desktop.
Save Aditsyal/e5115389fd70f6d5628c25a25f88a1d0 to your computer and use it in GitHub Desktop.
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