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..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,10 @@ +## 2.2.0 + +* Added gesture handling options for 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'