パッケージ、リポジトリ、アプリカテゴリを検索

flutter_swipe_button のカバー
パッケージ詳細v2.1.3

flutter_swipe_button

SwipeButton を使用して、誤ったタップやダイアログを防ぎましょう。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
6960
いいね数
68
Pub ポイント
140

パッケージをインストール

flutter pub add flutter_swipe_button

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

flutter_swipe_button パッケージは、Flutter アプリでの誤操作を防ぐためにスワイプによる確認インターフェースを提供します。ユーザーがボタンをスワイプして操作を完了するようにすることで、意図的なインタラクションの層を追加し、データ削除や購入の確認など重要な操作に最適です。このコンポーネントはカスタマイズ可能で、複数のプラットフォームをサポートし、既存のUIにスムーズに統合できます。現代的で直感的なデザインを維持しながら、不注意な操作を減らすことで、ユーザーエクスペリエンスを向上させます。

用途

  • 誤削除を防ぐ
  • センシティブな操作の確認
  • フォームにおける誤検出の削減
  • 重要な操作のセキュリティの強化
  • 確認ダイアログのUXを改善する

主な機能

  • スワイプによる確認ジェスチャー
  • カスタマイズ可能な外観
  • クロスプラットフォーム対応
  • シンプルな統合
  • 設定可能なアニメーション
  • アクセシビリティ対応のデザイン

適している対象

  • 高リスクな操作を含むアプリ
  • 確認ステップを必要とするユーザーインターフェース
  • モバイル最優先のアプリケーション
  • UXの安全性を最優先とする開発者
  • 最小限のコード変更が必要なプロジェクト

注意事項

  • 追加のアクセシビリティテストが必要になる場合があります
  • 急速な連続操作には適していません
  • 一方向へのスワイプに制限される
  • 複数プラットフォーム間のデザインの一貫性
  • 新規ユーザーに対する学習曲線の可能性
  • ジェスチャー認識の正確性に依存する

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

flutter_swipe_button

pub package License: MIT

Avoid accidental clicks or dialogs to prevent them using SwipeButton.

Screenshot

Example 1 Example 2 Example 3

Getting Started

Adding package
flutter_swipe_button: ^2.1.1+1
Importing package
import 'package:flutter_swipe_button/flutter_swipe_button.dart';

How to use

SwipeButton.expand(
  thumb: Icon(
    Icons.double_arrow_rounded,
    color: Colors.white,
  ),
  child: Text(
    "Swipe to ...",
    style: TextStyle(
      color: Colors.red,
    ),
  ),
  activeThumbColor: Colors.red,
  activeTrackColor: Colors.grey.shade300,
  onSwipe: () {
    ScaffoldMessenger.of(context).showSnackBar(
      SnackBar(
        content: Text("Swipped"),
        backgroundColor: Colors.green,
      ),
    );
  },
)

SwipeButton(
  trackPadding: EdgeInsets.all(6),
  elevationThumb: 2,
  child: Text(
    "Swipe to ...",
    style: TextStyle(
      color: Colors.white,
    ),
  ),
  onSwipe: () {
    ScaffoldMessenger.of(context).showSnackBar(
      SnackBar(
        content: Text("Swipped"),
        backgroundColor: Colors.green,
      ),
    );
  },
)

SwipeButton(
  thumbPadding: EdgeInsets.all(3),
  thumb: Icon(
    Icons.chevron_right,
    color: Colors.white,
  ),
  elevationThumb: 2,
  elevationTrack: 2,
  child: Text(
    "Swipe to ...".toUpperCase(),
    style: TextStyle(
      color: Colors.white,
      fontSize: 18,
      fontWeight: FontWeight.bold,
    ),
  ),
  onSwipe: () {
    ScaffoldMessenger.of(context).showSnackBar(
      SnackBar(
        content: Text("Swipped"),
        backgroundColor: Colors.green,
      ),
    );
  },
)

SwipeButton(
  borderRadius: BorderRadius.circular(8),
  activeTrackColor: Colors.amber,
  height: 60,
  child: Text(
    "Swipe to ...",
    style: TextStyle(
      color: Colors.red,
    ),
  ),
  onSwipe: () {
    ScaffoldMessenger.of(context).showSnackBar(
      SnackBar(
        content: Text("Swipped"),
        backgroundColor: Colors.green,
      ),
    );
  },
)

SwipeButton(
  activeTrackColor: Colors.blue,
  activeThumbColor: Colors.yellow,
  borderRadius: BorderRadius.zero,
  height: 30,
  child: Text(
    "Swipe to ...",
    style: TextStyle(
      color: Colors.white,
    ),
  ),
  onSwipe: () {
    ScaffoldMessenger.of(context).showSnackBar(
      SnackBar(
        content: Text("Swipped"),
        backgroundColor: Colors.green,
      ),
    );
  },
)

SwipeButton(
  width: 200,
  child: Text(
    "Swipe to ...",
    style: TextStyle(
      color: Colors.white,
    ),
  ),
  onSwipe: () {
    ScaffoldMessenger.of(context).showSnackBar(
      SnackBar(
        content: Text("Swipped"),
        backgroundColor: Colors.green,
      ),
    );
  },
)

License

MIT License

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。