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
<manifest ... | |
<application ... | |
<meta-data android:name="com.google.android.geo.API_KEY" | |
android:value="YOUR ANDROID API KEY HERE"/> |
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
import 'dart:async'; | |
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(); |
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
void _onMapTypeButtonPressed() { | |
setState(() { | |
_currentMapType = _currentMapType == MapType.normal | |
? MapType.satellite | |
: MapType.normal; | |
}); | |
} |
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
MapType _currentMapType = MapType.normal; | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
... | |
GoogleMap( | |
... | |
mapType: _currentMapType, | |
), |
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
body: Stack( | |
children: <Widget>[ | |
GoogleMap( | |
onMapCreated: _onMapCreated, | |
initialCameraPosition: CameraPosition( | |
target: _center, | |
zoom: 11.0, | |
), | |
), | |
Padding( |
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
import 'dart:async'; | |
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(); |
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
dependencies: | |
... | |
google_maps_flutter: ^0.4.0 |
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
import 'dart:html'; | |
class DragScroll { | |
var mousemove = 'mousemove'; | |
var mouseup = 'mouseup'; | |
var mousedown = 'mousedown'; | |
var EventListener = 'EventListener'; | |
// ??? what are these ??? | |
// var addEventListener = 'add'+EventListener; |
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
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.example.googlemapspluginexample"> | |
<!-- The INTERNET permission is required for development. Specifically, | |
flutter needs it to communicate with the running application | |
to allow setting breakpoints, to provide hot reload, etc. | |
--> | |
<uses-permission android:name="android.permission.INTERNET"/> | |
<!-- io.flutter.app.FlutterApplication is an android.app.Application that |
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
#include "AppDelegate.h" | |
#include "GeneratedPluginRegistrant.h" | |
// Add the GoogleMaps import. | |
#import "GoogleMaps/GoogleMaps.h" | |
@implementation AppDelegate | |
- (BOOL)application:(UIApplication *)application | |
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |
// Add the following line with your API key. |