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

GitHub リポジトリBluebar1/dyn_mouse_scroll

dyn_mouse_scroll

Flutterパッケージ。すべてのプラットフォームでマウスによるスムーズスクロールを可能にする、スクロール可能なウィジェット用のラッパーです。

dyn_mouse_scroll のプロジェクト画像
スター
11
フォーク
15
最終プッシュ(UTC)
2023/07/09
プロジェクト状態
公開中

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

Dynamic Mouse Scroll

A wrapper for scrollable widgets that enables smooth scrolling with a mouse on all platforms.

First gif: Scrolling slowly.
Second gif: Scrolling quickly (flick scroll).
Third gif: Mobile drag scroll detected, physics change.

Features

  • Animate smooth scroll based on speed of user's scroll.
  • Uses universal_io to detect if platform is mobile or desktop.
  • Automatically detect if the wrong ScrollPhysics is being used and update using provider.
  • Adjust the duration of your scroll events.
  • Choose what mobile physics you would like to use.

Basic Usage

DynMouseScroll(
  builder: (context, controller, physics) => ListView(
    controller: controller,
    physics: physics,
    children: ...
    )
)

Problem:

Flutter does not animate smooth scrolls for pointers, causing choppy experiences for the end user. One package, web_smooth_scroll, attempts to fix this problem by disabling default scrolling entirely (mobile can't drag now) and listening for pointer events to animate the scroll controller that can only move at one speed.

Solution:

To allow mobile default scrolling to still be accessible I detect the user's platform and automatically update if the detection was wrong. When the user scrolls, the 'futurePosition' variable is updated and the animation is started.

Bluebar1 GitHub avatar
GitHub 作者

Bluebar1 ↗

言語Dart

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 5 件

プロジェクトに合うリポジトリを選ぶには?

用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。

  1. 名前・作者・説明で検索し、技術トピックで絞り込みます。
  2. スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
  3. 利用前に GitHub で README、ライセンス、Issues を確認します。

情報源と管理

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗