From 92c83278b070a6caa2b76a843e04099fda60b29a Mon Sep 17 00:00:00 2001 From: Rexios Date: Wed, 23 Feb 2022 22:30:18 -0500 Subject: [PATCH 1/2] Cherry-picked google_maps_flutter_platform_interface changes from feature/more-web-config-options --- .../CHANGELOG.md | 6 +++++- .../lib/src/types/gesture_handling.dart | 18 ++++++++++++++++++ .../lib/src/types/types.dart | 1 + .../pubspec.yaml | 2 +- 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/gesture_handling.dart diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md index d1b4ef8c18cf..8509ab668293 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md @@ -1,6 +1,10 @@ +## 2.2.0 + +* Added options for gesture handling and tilt controls on web + ## 2.1.5 -Removes dependency on `meta`. +* Removes dependency on `meta`. ## 2.1.4 diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/gesture_handling.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/gesture_handling.dart new file mode 100644 index 000000000000..73c544aa1fa7 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/gesture_handling.dart @@ -0,0 +1,18 @@ +/// This setting controls how the API handles gestures on the map +enum GestureHandling { + /// Scroll events and one-finger touch gestures scroll the page, and do not + /// zoom or pan the map. Two-finger touch gestures pan and zoom the map. + /// Scroll events with a ctrl key or ⌘ key pressed zoom the map. In this mode + /// the map cooperates with the page. + cooperative, + + /// All touch gestures and scroll events pan or zoom the map. + greedy, + + /// The map cannot be panned or zoomed by user gestures. + none, + + /// (default) Gesture handling is either cooperative or greedy, depending on + /// whether the page is scrollable or in an iframe. + auto, +} diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart index 5e2e4c234ccf..1df1ee85a6a9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart @@ -9,6 +9,7 @@ export 'camera.dart'; export 'cap.dart'; export 'circle_updates.dart'; export 'circle.dart'; +export 'gesture_handling.dart'; export 'joint_type.dart'; export 'location.dart'; export 'maps_object_updates.dart'; diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_platform_interface/pubspec.yaml index 6125dd43d9f6..9c9402302ca7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/pubspec.yaml @@ -4,7 +4,7 @@ repository: https://github.com/flutter/plugins/tree/main/packages/google_maps_fl issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 # NOTE: We strongly prefer non-breaking changes, even at the expense of a # less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes -version: 2.1.5 +version: 2.2.0 environment: sdk: '>=2.12.0 <3.0.0' From d12d811503abf1183c58673bea73bdf7bad222b5 Mon Sep 17 00:00:00 2001 From: Rexios Date: Wed, 23 Feb 2022 22:36:41 -0500 Subject: [PATCH 2/2] Updated changelog --- .../google_maps_flutter_platform_interface/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md index 8509ab668293..20e73068df82 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md @@ -1,6 +1,6 @@ ## 2.2.0 -* Added options for gesture handling and tilt controls on web +* Added gesture handling options for web ## 2.1.5