カテゴリー・パッケージ・リポジトリを検索

mouse_follower のカバー
パッケージ詳細v1.4.3

mouse_follower

マウスフォロワーでアプリケーションを強化し、カーソル効果のカスタマイズを簡単に実現します。独自のエフェクトを作成するのは、これまでになく簡単です。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
63
いいね数
42
Pub ポイント
160

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

flutter pub add mouse_follower

パッケージ概要

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

Mouse Follower は、Windows、Linux、macOS 用のデスクトップアプリケーション向けにカスタムカーソル効果を実装できる Flutter パッケージです。アニメーションやスタイル化されたカーソルをスムーズに統合でき、ユーザーインタラクションと視覚的魅力を向上させます。簡単な設定で、アプリのテーマやインタラクティブ要素に合わせてマウスポインターの外観や挙動をカスタマイズできます。Web、Android、iOS、デスクトップ環境など複数のプラットフォームをサポートしており、ダイナミックなカーソル体験を求めるクロスプラットフォームデスクトップアプリに最適です。

用途

  • インタラクティブなUIデザイン
  • カスタムカーソルアニメーション
  • デスクトップアプリケーションの拡張機能
  • ゲーム化インターフェース
  • 視覚フィードバックシステム

主な機能

  • カーソル効果のカスタマイズが簡単
  • クロスプラットフォーム対応
  • 軽量でパフォーマンスに優れる
  • 設定可能なアニメーションプロパティ
  • デスクトップおよびWebをサポート

適している対象

  • デスクトップアプリ開発者
  • UI/UXデザイナー
  • インタラクティブなアプリケーション作成者
  • ゲーム化プロジェクト
  • クリエイティブなプロトタイピング

注意事項

  • デスクトップおよびWebプラットフォームに限定
  • 複雑なアニメーションではパフォーマンスに影響を与える可能性があります
  • 完全な機能を実現するには、プラットフォーム固有の設定が必要です
  • モバイル専用アプリケーションには適していません
  • カーソルの動作は、オペレーティングシステムによって異なる場合があります

元の README

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

Mouse Follower

Mouse Follower is a powerful package that empowers you to create custom mouse followers for your applications, breaking through design limitations. With additional features such as the flexibility to design any shape you want, uncomplicated properties, and ease of use, it offers unparalleled flexibility and creativity in enhancing user interactions.

Easy and Fast adding on feature for your Flutter Apps

https://github.com/mokaily/mouse_follower/assets/32467495/b57973bc-4c41-4804-917d-7853530fadf2

Dummy example

Real world example

Advanced Animated Examples

Why mouse_follower?

  • 🚀 Easy to implement
  • 🔌 Speed and Sensitivity Settings
  • 💾 Opacity Control
  • ⚡ Support for any child widgets
  • ↩️ Position Control
  • ❤️ Customize the cursor shape itself
  • 💻 Documentation and Tutorials.
  • 🛡️ Null safety support.
  • 🖨️ Customizable designs.

Getting Started

🔩 Installation

Add to your pubspec.yaml:

dependencies:
  mouse_follower: 

import the library path:

import 'package:mouse_follower/mouse_follower.dart';
⚙️ Configuration app

Add MouseFollower widget like in the example.

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: MouseFollower(
          showDefaultMouseStyle: true,
          child:MyHomePage(),
      )
    );
  }

📜 MouseFollower() widget properties
Properties Required Default Description
key false Widget key.
isVisible false `kIsWeb
child true Put your child widget here (recommanded to put the whole app).
mouseStylesStack false [MouseStyle()] Stack of MouseStyle with multiple options
onHoverMouseStylesStack false [MouseStyle()] Stack of MouseStyle that appears when hovering over the MouseOnHoverEvent widget
showDefaultMouseStyle false true When true the default cursor will appear if mouseStylesStack and onHoverMouseStylesStack are empty.
defaultMouseCursor false MouseCursor.defer To change the default Mouse system icon
onHoverMouseCursor false MouseCursor.defer To change the default Mouse system icon for MouseOnHoverEvent Widget

Usage

🔥 Add your mouse custom style
...
  Widget build(BuildContext context) {
  return MaterialApp(
      home: MouseFollower(
            mouseStylesStack: [
                MouseStyle(
                  size: const Size(7, 7), latency: const Duration(milliseconds: 25),
                  decoration: BoxDecoration(color: Theme.of(context).primaryColor, shape: BoxShape.circle),
                  ),
                MouseStyle(
                  size: const Size(26, 26), latency: const Duration(milliseconds: 75),
                  visibleOnHover: false,
                  decoration: BoxDecoration(
                      color: Colors.transparent,
                      shape: BoxShape.circle,
                      border: Border.all(color: Theme.of(context).primaryColor)),
                ),
            ],
            child:MyHomePage())
  );
}

🔥 Add your mouse on hover custom style
...
  Widget build(BuildContext context) {
  return MaterialApp(
      home: MouseFollower(
            mouseStylesList: ....
            onHoverMouseStylesStack: [
                MouseStyle(size: const Size(50,50),
                    latency: const Duration(milliseconds: 25),
                    decoration: BoxDecoration(shape: BoxShape.circle,
                    color: Theme.of(context).primaryColor.withAlpha(150)),
            ),
          ],
        child:MyHomePage())
  );
}

/// to activate onHover style you have to wrap the needed widget by `MouseOnHoverEvent`.
...
  MouseOnHoverEvent(child: Text("Hover Me!"))
...

📜 MouseStyle() widget properties
Properties Default Description
key Widget key.
child You can add your custom child for Mouse Style.
size Size(15,15) Resize the mouse style as you want.
decoration Customize your own decoration.
latency Duration(milliseconds: 25) Add latency duration for the mouse follower style
alignment Alignment.center By default the mouse style is in center position for the cursor
opacity 1.0 You can adjust the opacity of the style from 0.0 not visible to 1.0 visible
opaque false
animationDuration Duration(milliseconds: 300) Animation duration when changing the style from widget to another
animationCurve Curves.easeOutExpo You can change the animation style
transform
visibleOnHover false If you want to enable the same style in onHoverMouseEvent enable this
📜 MouseOnHoverEvent() widget properties
Properties Type Description
key Widget key.
child Widget A required child to be wrapped.
decoration BoxDecoration? Override the default or the inialized decoration.
size Size? Override the default or the inialized mouse size.
mouseChild Widget? Override the default or the inialized mouse child.
onHoverMouseCursor MouseCursor? Override the default or the inialized mouse cursor.
customOnHoverMouseStylesStack List<MouseStyle>? Override the default or the inialized mouse styles stack.
animationCurve Curve? Override the default or the the inialized animation curve.
animationDuration Duration? Override the default or the inialized animation duration.
opacity double? Override the default or the inialized opacity.
alignment Alignment? Override the default or the inialized alignment.
latency Duration? Override the default or the inialized latency.
📜 Custom child
MouseOnHoverEvent(
    decoration: const BoxDecoration(shape: BoxShape.rectangle, color: Colors.transparent),
    size: const Size(100,50),
    opacity: 0.5,
    latency: const Duration(milliseconds: 75),
    mouseChild: Image.network("images/mouse_follower.jpg"),
    child: const Text("Hover Me!")
),

📜 magnifier
MouseOnHoverEvent(
    customOnHoverMouseStylesStack: [
        MouseStyle(
        size: Size(50, 50),
        latency: Duration(milliseconds: 0),
        child: RawMagnifier(
            size: Size(80, 80),
            magnificationScale: 1.5,
            decoration: MagnifierDecoration(shape: CircleBorder()),
            ),
        ),
    ],
    child: Text("Can you read this text!"),
),

📜 custom icon
MouseOnHoverEvent(
    onHoverMouseCursor: SystemMouseCursors.none,
    customOnHoverMouseStylesStack: [
    MouseStyle(
        latency: const Duration(milliseconds: 0),
        child: Image.network("images/cursor.png"),
        )
    ],
    child: const Text("You can replace the cursor itself with almost any widget"),
),

Donations

We need your support. Projects like this can not be successful without support from the community. If you find this project useful, and would like to support further development and ongoing maintenance, please consider donating.

Buy Me A Coffee

Sponsors

Want to become a sponsor? [Become a Sponsor]

Sponsor me on GitHub

カテゴリー

ソースリポジトリ

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

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