ReorderableListView will cause flutter_slidable error when long press to sort

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

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

Hướng nghiên cứu

The stack trace names SlidableScrollingBehavior and SlidableNotificationSender in the flutter_slidable package, and the trigger is a long press inside a ReorderableListView. Start by reproducing with a minimal list that has slidable items and a reorderable long press, then check where Scrollable.of() is called from the slidable scrolling behaviour's context. Done means the long-press reorder runs without the assertion, with a test that covers it.

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

Mô tả

Flutter 3.7.6 • channel stable
flutter_slidable 2.0.0

1、Without long pressing the widget to sort, everything works fine

2、When sorting by long press, the following error occurs

======== Exception caught by widgets library =======================================================
The following assertion was thrown building SlidableNotificationSender(state: _SlidableNotificationSenderState#c9e0d):
Scrollable.of() was called with a context that does not contain a Scrollable widget.

No Scrollable widget ancestor could be found starting from the context that was passed to Scrollable.of(). This can happen because you are using a widget that looks for a Scrollable ancestor, but no such ancestor exists.
The context used was:
SlidableScrollingBehavior(dirty, state: _SlidableScrollingBehaviorState#00531)

Ngôn ngữ chính
Dart
Star
2.9k
Fork
646
Merge trung bình
5 phút
Pull request đã merge (30 ngày)
9

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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.

Issue khác của letsar/flutter_slidable

Tất cả issue của letsar/flutter_slidable

Issue tương tự

Thêm issue về Dart

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.