Skip to content

Instantly share code, notes, and snippets.

View kenzieschmoll's full-sized avatar

Kenzie Davisson kenzieschmoll

  • Google
  • Portland, OR
View GitHub Profile
@kenzieschmoll
kenzieschmoll / AndroidManifest.xml
Created March 15, 2019 18:22
Maps Sample V2 - android manifest
<manifest ...
<application ...
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="YOUR ANDROID API KEY HERE"/>
@kenzieschmoll
kenzieschmoll / main.dart
Last active March 15, 2019 20:09
Maps Sample V2 - final main.dart code
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();
@kenzieschmoll
kenzieschmoll / main.dart
Last active February 28, 2019 01:30
Maps Sample V2 - change map appearance pt 2
void _onMapTypeButtonPressed() {
setState(() {
_currentMapType = _currentMapType == MapType.normal
? MapType.satellite
: MapType.normal;
});
}
@kenzieschmoll
kenzieschmoll / main.dart
Last active March 15, 2019 18:52
Maps Sample V2 - change the map appearance pt 1
MapType _currentMapType = MapType.normal;
@override
Widget build(BuildContext context) {
return MaterialApp(
...
GoogleMap(
...
mapType: _currentMapType,
),
@kenzieschmoll
kenzieschmoll / main.dart
Created February 28, 2019 01:14
Maps Sample V2 - add widget on top of map
body: Stack(
children: <Widget>[
GoogleMap(
onMapCreated: _onMapCreated,
initialCameraPosition: CameraPosition(
target: _center,
zoom: 11.0,
),
),
Padding(
@kenzieschmoll
kenzieschmoll / main.dart
Last active March 15, 2019 20:04
Maps Sample V2 - main.dart full screen map
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();
@kenzieschmoll
kenzieschmoll / pubspec.yaml
Last active March 15, 2019 18:00
Maps Sample v2 - pubspec.yaml
dependencies:
...
google_maps_flutter: ^0.4.0
import 'dart:html';
class DragScroll {
var mousemove = 'mousemove';
var mouseup = 'mouseup';
var mousedown = 'mousedown';
var EventListener = 'EventListener';
// ??? what are these ???
// var addEventListener = 'add'+EventListener;
@kenzieschmoll
kenzieschmoll / AndroidManifest.xml
Created December 17, 2018 16:17
maps sample - final AndroidManifest.xml
<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
@kenzieschmoll
kenzieschmoll / AppDelegate.m
Last active February 28, 2019 17:11
maps sample - final AppDelegate.m
#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.