如何解决Google Maps Flutter Gestures 三指滑动
我正在为我的 Flutter 移动应用程序使用 google maps flutter 插件。它工作正常,但是当我使用三个手指在屏幕上垂直滑动(与所有/大多数 Redmi 手机的手势一样)截取地图的屏幕截图时,地图将完全停止响应任何手势(滚动、缩放等)。没有任何效果)。它保持冻结状态,直到我重新加载页面。我添加了一些手势,如
body: GoogleMap(
initialCameraPosition: CameraPosition(
target: LatLng(lat,long ),zoom: 12),myLocationEnabled: true,tiltGesturesEnabled: true,compassEnabled: true,scrollGesturesEnabled: true,zoomGesturesEnabled: true,onMapCreated: _onMapCreated,markers: Set<Marker>.of(markers.values),gestureRecognizers: Set()
..add(Factory<PanGestureRecognizer>(() => PanGestureRecognizer()))
..add(Factory<ScaleGestureRecognizer>(() => ScaleGestureRecognizer()))
..add(Factory<TapGestureRecognizer>(() => TapGestureRecognizer()))
..add(Factory<VerticalDragGestureRecognizer>(
() => VerticalDragGestureRecognizer())
),
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。