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

パッケージ詳細v0.0.5

clickable_widget

このFlutterプラグインは、Flutterに本来ないジェスチャー処理機能を持ついくつかのFlutterウィジェットを提供します。

AndroidiOSmacOSWindowsLinux
30日間ダウンロード
53
いいね数
8
Pub ポイント
140

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

flutter pub add clickable_widget

パッケージ概要

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

clickable_widget パッケージは、Flutter のウィジェットライブラリを拡張し、ネイティブにサポートされていないウィジェットにタッチハンドラを追加します。Text、Icon、Container などの非インタラクティブなウィジェットでタップや長押し、その他のジェスチャーを可能にし、カスタムラッパーを必要とせずに使いやすさを向上させます。最小限のボイラープレートでインタラクティブなUI要素を作成するのに最適であり、クロスプラットフォームでのユーザー体験を強化します。

用途

  • テキスト要素にタップを追加する
  • インタラクティブなアイコンの作成
  • インタラクティブでないウィジェットからカスタムボタンを作成する
  • タッチフィードバックによるフォーム入力の強化
  • 複雑なレイアウトにおけるジェスチャー処理の簡素化

主な機能

  • 非インタラクティブなウィジェットのジェスチャー対応
  • 最小のコードオーバーヘッド
  • クロスプラットフォーム互換性
  • タップ、長押し、その他に対応
  • 既存のウィジェットとの簡単な統合

適している対象

  • 迅速なジェスチャー追加を求めるUI開発者
  • 軽量なインタラクティブコンポーネントが必要なプロジェクト
  • カスタムジェスチャー検出器を避ける Teams
  • インタラクティブプロトタイプを実装するデザイナー
  • 複数のプラットフォームをターゲットにするアプリ

注意事項

  • 基本的なジェスチャーの種類に限定される
  • レイアウトの管理に注意が必要な場合があります
  • 複雑なジェスチャーの連鎖には向いていません
  • 組み込みアニメーションサポートなし
  • 正しいウィジェット階層に依存する

元の README

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

Clickable Widget

This Flutter plugin provides some flutter widgets having gesture handlers their don't natively have in Flutter.

By default some flutter widgets (Widget Without Gesture) do not trigger gesture events so we wrap them inside the InkWell/GestureDetector widget. To overcome this, I decide to build a package which give developpers some gesture handlers directly inside WWG.

Available gesture handlers

  • onTap;
  • onTapDown;
  • onTapUp;
  • onTapCancel
  • onDoubleTapDown
  • onDoubleTap
  • onDoubleTapCancel
  • onLongPressDown
  • onLongPressCancel
  • onLongPress
  • onLongPressStart
  • onLongPressMoveUpdate
  • onLongPressUp
  • onLongPressEnd

Available widgets

  1. ClickableContainer
  2. ClickableImage
  3. ClickableCard
  4. ClickableGridTile
  5. ClickableSizedBox
  6. ClickableText
  7. ClickableRow
  8. ClickableColumn

Usage

Add Clickable Widget to your pubspec.yaml in dependencies: section.

dependencies:
  clickable_widget: ^latest

Update dependencies

  $ flutter pub get

Import Clickable Container widget in your code

  ClickableContainer(
    onTap: () {
      debugPrint("container tapped");
    },
    alignment: Alignment.center,
    width: 100.0,
    height: 100.0,
    color: Colors.grey,
    child: const Text("Tap me!"),
  ),

Import Clickable Image widget in your code

   ClickableImage(
    onTap: () {
      debugPrint("network image tapped");
    },
    clickableImageType: ClickableImageType.network,
    src: "https://pixabay.com/fr/images/search/nature/",
  ),

Import Clickable GridTile widget in your code

  ClickableGridTile(
    onTap: () {
      debugPrint("grid tile tapped");
    },
    child: const Text("Tap me!"),
  ),

For more exmample, refer to the example section.

Meta

Gael Vinou [gaelvinou@gmail.com](mailto:gaelvinou@gmail.com)

https://github.com/GV-22/clickable_widget

Distributed under the MIT License

Contributing

  1. Fork it (https://github.com/GV-22/clickable_widget/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

カテゴリー

ソースリポジトリ

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

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