1- // Copyright 2018 The Chromium Authors. All rights reserved.
2- // Use of this source code is governed by a BSD-style license that can be
3- // found in the LICENSE file.
4-
51part of google_maps_flutter;
62
73typedef void MapCreatedCallback (GoogleMapController controller);
84
95class GoogleMap extends StatefulWidget {
10- GoogleMap ({
11- @required this .onMapCreated,
12- GoogleMapOptions options,
13- this .gestureRecognizers = const < OneSequenceGestureRecognizer > [],
14- }) : assert (gestureRecognizers != null ),
15- this .options = GoogleMapOptions .defaultOptions.copyWith (options);
6+ GoogleMap ({@required this .onMapCreated, GoogleMapOptions options})
7+ : this .options = GoogleMapOptions .defaultOptions.copyWith (options);
168
179 final MapCreatedCallback onMapCreated;
18-
1910 final GoogleMapOptions options;
2011
21- /// Which gestures should be consumed by the map.
22- ///
23- /// It is possible for other gesture recognizers to be competing with the map on pointer
24- /// events, e.g if the map is inside a [ListView] the [ListView] will want to handle
25- /// vertical drags. The map will claim gestures that are recognized by any of the
26- /// recognizers on this list.
27- ///
28- /// When this list is empty, the map will only handle pointer events for gestures that
29- /// were not claimed by any other gesture recognizer.
30- final List <OneSequenceGestureRecognizer > gestureRecognizers;
31-
3212 @override
3313 State createState () => new _GoogleMapState ();
3414}
@@ -40,7 +20,6 @@ class _GoogleMapState extends State<GoogleMap> {
4020 return AndroidView (
4121 viewType: 'plugins.flutter.io/google_maps' ,
4222 onPlatformViewCreated: onPlatformViewCreated,
43- gestureRecognizers: widget.gestureRecognizers,
4423 creationParams: widget.options._toJson (),
4524 creationParamsCodec: const StandardMessageCodec (),
4625 );
0 commit comments