Add the possibility to pass a custom Clipper to the slidable
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
調査の方向性
The relevant code is the private _SlidableClipper class, which the issue's snippet shows with getClip, getApproximateClipRect and shouldReclip, plus the Slidable widget constructor where an optional parameter would go. Start by reading how _SlidableClipper is created and applied, then decide how to expose it, such as an abstract base class with a default implementation. Done means Slidable accepts an optional custom clipper and default behaviour is unchanged. The API shape is not settled in the thread, so confirm it with a maintainer first.
索引モデルが issue の本文から書いたものです。
説明
Transform that class in an abstract one and become an optional parameter to the Slidable, i'm struggling to make some custom animations in my code using the package without this customization:
class _SlidableClipper extends CustomClipper<Rect> {
_SlidableClipper({
required this.axis,
required this.controller,
}) : super(reclip: controller.animation);
final Axis axis;
final SlidableController controller;
@override
Rect getClip(Size size) {
switch (axis) {
case Axis.horizontal:
final double offset = controller.ratio * size.width;
if (offset < 0) {
return Rect.fromLTRB(size.width + offset, 0, size.width, size.height);
}
return Rect.fromLTRB(0, 0, offset, size.height);
case Axis.vertical:
final double offset = controller.ratio * size.height;
if (offset < 0) {
return Rect.fromLTRB(
0,
size.height + offset,
size.width,
size.height,
);
}
return Rect.fromLTRB(0, 0, size.width, offset);
}
}
@override
Rect getApproximateClipRect(Size size) => getClip(size);
@override
bool shouldReclip(_SlidableClipper oldClipper) {
return oldClipper.axis != axis;
}
}
- 主要言語
- 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 日以内に返信
-
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 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
letsar/flutter_slidable#527 ·
メンテナーはふだん 1 日以内に返信
letsar/flutter_slidable の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
immich-app/immich#33043 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Notalib/flutter_readium#312 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
finamp-app/finamp#1860 ·
メンテナーはふだん 1 日以内に返信
-
bug javascript
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug to check
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信