mapbox / mapbox/mapbox-maps-flutter

TransparentPointer fail

Đang mở
#116 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Dart
Star
380
Fork
204
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I'm trying to switch from using the [flutter-mapbox-gl](https://github.com/flutter-mapbox-gl/maps) plugin to this one, and I ran into an issue...

I'm using a [transparent pointer](https://pub.dev/packages/transparent_pointer) over the map, in a Stack widget, so I can turn off some automated panning and zooming if the user starts interacting with the map; I'm interpreting gestures as pans, zooms, and rotates, and also letting the gestures bubble through to the map. This works fine with that other mapbox plugin, but with this one I get:

```
I/flutter ( 8823): ⚠️ Unhandled Flutter error: 'package:flutter/src/gestures/tap.dart': Failed assertion: line 210 pos 14: '_down == null && _up == null': is not true.

======== Exception caught by gesture library =======================================================
The following assertion was thrown while dispatching a pointer event:
'package:flutter/src/gestures/tap.dart': Failed assertion: line 210 pos 14: '_down == null && _up == null': is not true.

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=2_bug.md

When the exception was thrown, this was the stack:
#2 BaseTapGestureRecognizer.addAllowedPointer (package:flutter/src/gestures/tap.dart:210:14)
#3 GestureRecognizer.addPointer (package:flutter/src/gestures/recognizer.dart:160:7)
#4 RawGestureDetectorState._handlePointerDown (package:flutter/src/widgets/gesture_detector.dart:1498:18)
#5 RenderPointerListener.handleEvent (package:flutter/src/rendering/proxy_box.dart:3168:29)
#6 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:440:22)
#7 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:336:11)
#8 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:395:7)
#9 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:357:5)
#10 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:314:7)
#11 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:295:7)
#12 _invoke1 (dart:ui/hooks.dart:164:13)
#13 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:361:7)
#14 _dispatchPointerDataPacket (dart:ui/hooks.dart:91:31)
(elided 2 frames from class _AssertionError)
Event: PointerDownEvent#85236(position: Offset(222.0, 753.2))
position: Offset(222.0, 753.2)
Target: RenderPointerListener#00676 relayoutBoundary=up8
parentData: (can use size)
constraints: BoxConstraints(0.0<=w<=411.4, 0.0<=h<=819.4)
size: Size(411.4, 819.4)
behavior: deferToChild
listeners: down, panZoomStart
```

Is there a way to make this work?

Alternatively, is there a way to listen for *user initiated* zooms, pans, and rotates with this package?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện assertion với transparent_pointer trên map trong một Stack, sử dụng các gesture callback được示示 trong báo cáo. Đọc gesture stack của Flutter xung quanh tap.dart, gesture_detector.dart và các điểm đầu vào gesture của package bản đồ; công việc được xem là hoàn tất khi tương tác không còn gây ra assertion và các gesture pan, zoom và rotate do người dùng khởi tạo có thể được phân biệt hoặc ghi lại trong tài liệu.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
dart, flutter
Lĩnh vực
mobile
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.