Merge pull request #2 from LEG-Industries/maps-screen

Maps screen
This commit is contained in:
Benjamin Ramhorst 2022-02-09 16:53:21 +00:00 committed by GitHub
commit d29671a926
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 134 additions and 3 deletions

View file

@ -44,7 +44,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.legbarkr.leg_barkr_app"
minSdkVersion flutter.minSdkVersion
minSdkVersion 20
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName

View file

@ -4,6 +4,10 @@
android:label="leg_barkr_app"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyDzQFpqa2XFmVSHmBFNjuQ37iFcku9imF4"/>
<activity
android:name=".MainActivity"
android:exported="true"

View file

@ -8,6 +8,9 @@ import Flutter
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
GMSServices.provideAPIKey("AIzaSyDzQFpqa2XFmVSHmBFNjuQ37iFcku9imF4")
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}

View file

@ -1,10 +1,35 @@
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
class MapPage extends StatelessWidget {
class MapPage extends StatefulWidget {
const MapPage({ Key? key }) : super(key: key);
@override
_MapPageState createState() => _MapPageState();
}
class _MapPageState extends State<MapPage> {
late GoogleMapController _mapController;
// This will be changed, to center around the dog (once app reads data from the server)
final LatLng _center = const LatLng(51.498356, -0.176894);
void _onMapCreated(GoogleMapController mapController) {
_mapController = mapController;
}
@override
Widget build(BuildContext context) {
return Text("Map Page");
return MaterialApp(
home: Scaffold(
body: GoogleMap(
onMapCreated: _onMapCreated,
initialCameraPosition: CameraPosition(
target: _center,
zoom: 16.0,
),
),
),
);
}
}

View file

@ -43,6 +43,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
csslib:
dependency: transitive
description:
name: csslib
url: "https://pub.dartlang.org"
source: hosted
version: "0.17.1"
cupertino_icons:
dependency: "direct main"
description:
@ -69,11 +76,72 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
google_maps:
dependency: transitive
description:
name: google_maps
url: "https://pub.dartlang.org"
source: hosted
version: "5.3.0"
google_maps_flutter:
dependency: "direct main"
description:
name: google_maps_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
google_maps_flutter_platform_interface:
dependency: transitive
description:
name: google_maps_flutter_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.5"
google_maps_flutter_web:
dependency: "direct main"
description:
name: google_maps_flutter_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.2+1"
html:
dependency: transitive
description:
name: html
url: "https://pub.dartlang.org"
source: hosted
version: "0.15.0"
js:
dependency: transitive
description:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3"
js_wrapping:
dependency: transitive
description:
name: js_wrapping
url: "https://pub.dartlang.org"
source: hosted
version: "0.7.4"
lints:
dependency: transitive
description:
@ -109,6 +177,27 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.11.1"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
sanitize_html:
dependency: transitive
description:
name: sanitize_html
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
sky_engine:
dependency: transitive
description: flutter
@ -135,6 +224,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
stream_transform:
dependency: transitive
description:
name: stream_transform
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
string_scanner:
dependency: transitive
description:
@ -172,3 +268,4 @@ packages:
version: "2.1.1"
sdks:
dart: ">=2.16.0 <3.0.0"
flutter: ">=2.5.0"

View file

@ -34,6 +34,8 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
google_maps_flutter: ^2.1.1
google_maps_flutter_web: ^0.3.2+1
dev_dependencies:
flutter_test: