-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only check permissions if location is used
The apple_maps_plugin will only request the users permission for location, if the userLocation is actually used. Fixes #6
- Loading branch information
Showing
21 changed files
with
477 additions
and
215 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
org.gradle.jvmargs=-Xmx1536M | ||
|
||
android.enableR8=true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# | ||
# NOTE: This podspec is NOT to be published. It is only used as a local source! | ||
# | ||
|
||
Pod::Spec.new do |s| | ||
s.name = 'Flutter' | ||
s.version = '1.0.0' | ||
s.summary = 'High-performance, high-fidelity mobile apps.' | ||
s.description = <<-DESC | ||
Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS. | ||
DESC | ||
s.homepage = 'https://flutter.io' | ||
s.license = { :type => 'MIT' } | ||
s.author = { 'Flutter Dev Team' => '[email protected]' } | ||
s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } | ||
s.ios.deployment_target = '8.0' | ||
s.vendored_frameworks = 'Flutter.framework' | ||
end |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
// Copyright 2018 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// ignore_for_file: public_member_api_docs | ||
|
||
import 'package:flutter/foundation.dart'; | ||
import 'package:flutter/gestures.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter/rendering.dart'; | ||
import 'package:apple_maps_flutter/apple_maps_flutter.dart'; | ||
|
||
import 'page.dart'; | ||
|
||
class ScrollingMapPage extends Page { | ||
ScrollingMapPage() : super(const Icon(Icons.map), 'Scrolling map'); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return const ScrollingMapBody(); | ||
} | ||
} | ||
|
||
class ScrollingMapBody extends StatelessWidget { | ||
const ScrollingMapBody(); | ||
|
||
final LatLng center = const LatLng(32.080664, 34.9563837); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return ListView( | ||
children: <Widget>[ | ||
Card( | ||
child: Padding( | ||
padding: const EdgeInsets.symmetric(vertical: 30.0), | ||
child: Column( | ||
children: <Widget>[ | ||
const Padding( | ||
padding: EdgeInsets.only(bottom: 12.0), | ||
child: Text('This map consumes all touch events.'), | ||
), | ||
Center( | ||
child: SizedBox( | ||
width: 300.0, | ||
height: 300.0, | ||
child: AppleMap( | ||
initialCameraPosition: CameraPosition( | ||
target: center, | ||
zoom: 11.0, | ||
), | ||
gestureRecognizers: | ||
<Factory<OneSequenceGestureRecognizer>>[ | ||
Factory<OneSequenceGestureRecognizer>( | ||
() => EagerGestureRecognizer(), | ||
), | ||
].toSet(), | ||
), | ||
), | ||
), | ||
], | ||
), | ||
), | ||
), | ||
Card( | ||
child: Padding( | ||
padding: const EdgeInsets.symmetric(vertical: 30.0), | ||
child: Column( | ||
children: <Widget>[ | ||
const Text('This map doesn\'t consume the vertical drags.'), | ||
const Padding( | ||
padding: EdgeInsets.only(bottom: 12.0), | ||
child: | ||
Text('It still gets other gestures (e.g scale or tap).'), | ||
), | ||
Center( | ||
child: SizedBox( | ||
width: 300.0, | ||
height: 300.0, | ||
child: AppleMap( | ||
initialCameraPosition: CameraPosition( | ||
target: center, | ||
zoom: 11.0, | ||
), | ||
annotations: Set<Annotation>.of( | ||
<Annotation>[ | ||
Annotation( | ||
annotationId: AnnotationId("test_Annotation_id"), | ||
position: LatLng( | ||
center.latitude, | ||
center.longitude, | ||
), | ||
infoWindow: const InfoWindow( | ||
title: 'An interesting location', | ||
snippet: '*', | ||
), | ||
) | ||
], | ||
), | ||
gestureRecognizers: | ||
<Factory<OneSequenceGestureRecognizer>>[ | ||
Factory<OneSequenceGestureRecognizer>( | ||
() => ScaleGestureRecognizer(), | ||
), | ||
].toSet(), | ||
), | ||
), | ||
), | ||
], | ||
), | ||
), | ||
), | ||
], | ||
); | ||
} | ||
} |
Oops, something went wrong.