DMCA.com Protection Status
 
Search

Google Map Integration in Flutter, Dart, Android Studio || Flutter Side by Fresher Side


Below are the output screenshots & source code.

Just copy this source code in your editor & run the program using any emulator.


Output -



Source Code -



import 'package:flutter/material.dart';

import 'package:google_maps_flutter/google_maps_flutter.dart';


void main() => runApp(MyApp());


class MyApp extends StatefulWidget {

@override

_MyAppState createState() => _MyAppState();

}


class _MyAppState extends State<MyApp> {

GoogleMapController mapController;


final LatLng _center = const LatLng(45.521563, -122.677433);


void _onMapCreated(GoogleMapController controller) {

mapController = controller;

}


@override

Widget build(BuildContext context) {

return MaterialApp(

home: Scaffold(

appBar: AppBar(

title: Text('Google Maps Integration Task #6'),

backgroundColor: Colors.green[700],

),



body: GoogleMap(

onMapCreated: _onMapCreated,

initialCameraPosition: CameraPosition(

target: _center,

zoom: 11.0,

),

),

),

);

}

}

28 views0 comments

Related Posts

See All

Tut 5 Column || Flutter App Development

If you already read about Row widget from our previous blog then it will be very easy for you to understand about Column widgets because properties are almost same with Row widget. Column:- Column is

  • Facebook
  • Instagram
  • LinkedIn
  • 1024px-Telegram_logo.svg
  • download
  • YouTube
  • Google Play