ReorderableListView will cause flutter_slidable error when long press to sort

Abierto
#413 1 comentario 2 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
flutter
Área
mobile

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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)

Lenguaje dominante
Dart
Estrellas
2.9k
Forks
646
Merge medio
5 min
PR fusionados (30 d)
9

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de letsar/flutter_slidable

Todos los issues de letsar/flutter_slidable

Issues similares

Más issues de Dart

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.