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

flutter_bounce のカバー
パッケージ詳細v1.1.0

flutter_bounce

タップ時にラップされたウィジェットにバウンスアニメーションを実行する効率的なFlutterパッケージです。iOSおよびAndroidの両方のモバイルプラットフォームを対象としています。

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

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

flutter pub add flutter_bounce

パッケージ概要

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

flutter_bounce は、任意のラップされたウィジェットにタップ時のスムーズなバウンスアニメーションを追加する軽量で効率的なFlutterパッケージです。iOSおよびAndroid向けに設計されており、繊細で応答性のあるフィードバックによりユーザーインタラクションを強化します。パフォーマンスオーバーヘッドなしに既存UIにシームレスに統合できるため、ボタン、カード、その他のインタラクティブ要素に最適です。Web、macOS、Windows、Linuxなど複数のプラットフォームをサポートしており、デバイス間で一貫した動作を保証します。

用途

  • ボタンに触覚フィードバックを追加する
  • カードタップのインタラクションを強化する
  • アプリの応答性の向上
  • 魅力的なUIマイクロインタラクションの作成
  • クロスプラットフォームの一貫性のサポート

主な機能

  • タップ時のバウンスアニメーション
  • 軽量でパフォーマンスに優れる
  • クロスプラットフォーム対応
  • 簡単な統合
  • カスタマイズ可能なアニメーションの強度

適している対象

  • モバイルアプリ開発者
  • UI/UXデザイナー
  • インタラクティブプロトタイプビルダー
  • クロスプラットフォームアプリ開発者
  • 繊細なタッチフィードバックが必要なアプリ

注意事項

  • タップベースのアニメーションに限定
  • 高度なアニメーションカスタマイズなし
  • 他のジェスチャーディテクタと競合する可能性があります
  • シンプルなインタラクティブ要素に最適
  • 複雑なアニメーションシーケンスには向かない

元の README

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

flutter_bounce

pub_package git_license build

  • An efficient flutter package for an on-tap bounce animation on any flutter widgets
  • This package is an enhanced version of bouncing_widget.
  • Limitation of the bouncing_widget package:
    • It is not efficient for the widgets in Scroll Pages. We cannot scroll while having our fingers on the widget
    • The same issue would be found here

Advantages of flutter_bounce

  • Flutter bounce package will give you full freedom, to be used in on both the static and dynamic like scrolling pages.
  • Not sticky on scrolling, efficient bounce effect every where
  • With Duration, controll the bounce animation
  • It doesn't let the widget stay pressed when you scroll through, if we use the normal bounce effect with simply using the Flutter AnimationController and Tranform.scale() Widget.

Disclaimer

  • Widget flutter_widget is not the copy paste of bouncing_widget, it works differently. Without limitations, and the functionality works differently, based upon the duration, and not on the scaleFactor.
  • It doesn't have the scaleFactor at all, which is required in the widget
  • The code written in such a way that supports the flutter_bounce functionality. However, I have taken motivation from the limitations of the bouncing_widget

Usage

To use this plugin, add flutter_bounce as a dependency in your pubspec.yaml file.

Demo

This is how the Bounce Widget works when wrapped around the widget. The below shows Bounce being used in both the scenario:

  1. Static Page with Duration set facility
  2. Scroll Page with default Duration as 100 ms:
    • Horizontal Scroll
    • Vertical Scroll

Example

  • Import the library
import 'package:flutter_bounce/flutter_bounce.dart';
  • In order to use this package, we just need to wrap the content with the widget Bounce.
  • child, duration and onPressed is mandatory in the widget.
  • However, onPressed and duration can have null in the widget. By default duration is set to 100 milliseconds.
  • Please Note: Always pass the duration in milliseconds for best result
Bounce(
  duration: Duration(milliseconds: 110),
  onPressed: (){ YOUR_FUNCTION },
  child: YOUR_WIDGET
)

Acknowledgement

  • I would like to thank Levent Kantaroğlu for contributing in the recent null safety addition to the code, which will now help the community to use this package efficiently.
  • I would like to thank ThomasEcalle for the indirect motivation via his widget, to come up with an efficient work around, which will now be useful for our flutter community people

カテゴリー

ソースリポジトリ

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