ReorderableListView will cause flutter_slidable error when long press to sort

Aperta
#413 1 commento 2 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
flutter
Ambito
mobile

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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)

Lingua principale
Dart
Stelle
2.9k
Fork
646
Merge medio
5m
PR unite (30g)
9

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di letsar/flutter_slidable

Tutte le issue di letsar/flutter_slidable

Issue simili

Altre issue su Dart

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.