Query: Smooth DismissiblePane Implementation within ActionPane?
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
The report concerns how ActionPane, DismissiblePane and SlidableAction interact inside a Slidable with DrawerMotion on the start pane, so start with the code that handles the start pane's dismissible and its children. Reproduce with the snippet in the issue, swiping past the dismissThreshold with no children acting, and see where the drag stops. Done means a pane with only a DismissiblePane can be dismissed in one smooth swipe, with confirmDismiss returning false still closing the pane.
索引モデルが issue の本文から書いたものです。
説明
Hello,
Firstly, a huge thank you for this incredible package!
In my application, I have a list of products. I aim for users to validate a product by swiping from left to right, or be able to edit/delete it by swiping from right to left.
However, I'm encountering difficulty implementing just the DismissiblePane for the validation functionality. It seems ActionPane requires children, and therefore, the motion from the user is not smooth to validate the product. When a user swipes, they're initially obstructed by the ActionPaneAction, and only then can they dismiss the tile.
Do you know if it's possible to exclusively employ a DismissiblePane within an ActionPane?
Thank you!
Here is my minimal code :
Slidable(
key: ValueKey(index),
groupTag: '0',
startActionPane: ActionPane(
motion: const DrawerMotion(),
dismissible: DismissiblePane(
key: const ValueKey(0),
closeOnCancel: true,
dismissThreshold: 0.8,
confirmDismiss: () async {
doSth();
return false;
},
onDismissed: () {
print("Panel dismiss called");
}),
children: [
SlidableAction(
onPressed: (_) {}, // I don't want to perform any action here, but the motion do a stop here
backgroundColor: Colors.green,
foregroundColor: Colors.white,
icon: Icons.done,
),
],
),
endActionPane: ActionPane(
extentRatio: 0.4,
motion: const ScrollMotion(),
children: [
SlidableAction(
onPressed: (_) {},
backgroundColor: Colors.blue,
foregroundColor: Colors.white,
icon: Icons.edit,
),
SlidableAction(
onPressed: (_) {
product.isVisible = false;
setState(() {});
_deleteSelectedItems();
},
backgroundColor: Colors.red,
foregroundColor: Colors.white,
icon: Icons.delete,
),
],
),
child: ChildProduct(product),
);
- 主要言語
- Dart
- スター
- 2.9k
- フォーク
- 646
- 平均マージ
- 5分
- マージ済み PR(30日)
- 9
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
letsar/flutter_slidable のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
letsar/flutter_slidable#549 ·
メンテナーはふだん 1 日以内に返信
-
Lock action-pane intent for a continuous drag until neutral settle対応中かも @lukemmtt が 197 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
letsar/flutter_slidable#546 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
letsar/flutter_slidable#541 ·
メンテナーはふだん 1 日以内に返信
-
Example is not runnable on android対応中かも @akhil-ge0rge が 353 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 18/100
letsar/flutter_slidable#540 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
letsar/flutter_slidable#535 ·
メンテナーはふだん 1 日以内に返信
letsar/flutter_slidable の issue をすべて見る
似ている issue
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
patarapolw/lingua_srs#103 ·
メンテナーはふだん 1 日以内に返信
-
[Feature]オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
desktop linux photos
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
lichess-org/mobile#3944 ·
メンテナーはふだん 2 日以内に返信