Skip to content

Instantly share code, notes, and snippets.

Last active Jun 21, 2019
What would you like to do?
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
_MyAppState createState() => _MyAppState();
class _MyAppState extends State<MyApp> {
GoogleMapController mapController;
final LatLng _center = const LatLng(20.5937, 78.9629);
void _onMapCreated(GoogleMapController controller) {
mapController = controller;
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Google Office Locations'),
body: GoogleMap(
onMapCreated: _onMapCreated,
initialCameraPosition: CameraPosition(
target: _center,
zoom: 4,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment