Subsequent row is open after Slidable row is dismissed.

オープン
#472 コメント 3 件 リアクション 4 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
dart, flutter
領域
mobile

調査の方向性

The payload names the Slidable, SlidableController, ActionPane and DismissiblePane widgets, but no source files. Start by running the linked reproduction project (github.com/adammal/slidable_dismiss_problem) and confirming that the next row opens only when a shared controller is passed. Done means a dismissed row leaves the remaining rows closed with the controller set, plus a regression test.

索引モデルが issue の本文から書いたものです。

説明

Hello and thank you for the great library.

I've stumbled upon an issue in flutter_slidable: ^3.1.0 when dismissing a row and I've created a minimal project to reproduce it in-case it's helpful.
https://github.com/adammal/slidable_dismiss_problem

https://github.com/letsar/flutter_slidable/assets/6067137/ae867063-9004-4d1e-8572-1d48742aa899

Action

The user slides to dismiss a row in a series of Slidable rows.

Expected Behaviour

The row is dismissed and all remaining rows remain closed.

Actual Behaviour

The row is dismissed but the subsequent row is opened and remains open after the dismissal is complete.

Notes

I've also discovered that this is only an issue when a SlidableController is assigned to the Slideable's by the user.
If I remove the controller from the Slidable it works as expected.

Code in question
Slidable(
  key: UniqueKey(),
  controller: _slidableController,
  endActionPane: ActionPane(
    motion: const ScrollMotion(),
    dismissible: DismissiblePane(
      onDismissed: () => widget.onDelete(widget.value),
    ),
    children: [
      SlidableAction(
        onPressed: (context) => widget.onDelete(widget.value),
        label: 'Delete',
      )
    ],
  ),
  child: Container(
    constraints: const BoxConstraints(
      minHeight: 50,
      minWidth: double.infinity
    ),
    color: Colors.blue,
    child: Center(child: Text(widget.value.toString())),
  ),
),

Am I doing something wrong in the way i've implemented this?

Any help would be greatly appreciated.

主要言語
Dart
スター
2.9k
フォーク
646
平均マージ
5分
マージ済み PR(30日)
9

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

letsar/flutter_slidable のほかの issue

letsar/flutter_slidable の issue をすべて見る

似ている issue

Dart の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。