搜尋套件、儲存庫與 APP 分類

套件詳情v0.1.3

flutter_cursor

適用於 Flutter 的自定義游標支援(用於 Web 上的懸停)以及組件

近 30 天下載
39
喜歡數
21
Pub 分數
40

安裝套件

flutter pub add flutter_cursor

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

Flutter Cursor 是一個為 Flutter 應用程式在 Web 上提供自定義游標支援的套件,允許開發者使用專用組件創建互動式懸停效果。它透過在滑鼠互動期間提供視覺反饋來增強使用者體驗,特別適用於基於 Web 的介面。該套件與 Flutter 的元件系統無縫整合,並支援自訂游標外觀和行為。非常適合創造具有動態游標互動的吸引人、回應迅速的 Web 經驗。

適用情境

  • 互動式網頁使用者介面
  • 基於懸停的導航
  • 自定義游標動畫
  • 遊戲化介面
  • 增強的使用者反饋
  • Web 特定的設計元素

主要特色

  • 自定義光標控件
  • 僅限 Web 的懸停支援
  • 與 Flutter 的輕鬆整合
  • 可設定的游標外觀
  • 支援指標事件
  • 輕量且模組化

適合對象

  • 使用 Flutter 的 Web 開發人員
  • 尋求互動元件的設計人員
  • 需要懸停反饋的應用程式
  • 教育或遊戲應用
  • 以使用者介面為導向的Web應用程式

使用建議

  • 僅適用於網頁平台
  • 可能影響複雜游標的效能
  • 需要小心處理指針事件
  • 僅限基於鼠標的互動
  • 不適合用於行動應用程式

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

flutter_cursor pub package

Important Note

Flutter has integrated this package inside the core SDK! Update to Flutter 1.20+ and use MouseRegion!

Original

Custom cursor support for Flutter Web.

Wrap your widgets with HoverCursor and pass a cursor, and it will be updated when entering/leaving the hover zone.

Pub - API Docs - GitHub

Install

Install by adding this package to your pubspec.yaml:

dependencies:
  flutter_cursor: ^0.1.3

Usage

See Flutter example for a full overview.

HoverCursor

Changes cursor when entering/leaving the widget's hover zone on the web. This is safe to add on mobile (will have no effect).

import 'package:flutter_cursor/flutter_cursor.dart';

HoverCursor(
    cursor: Cursor.move,
    child: RaisedButton(
      child: Text("Move Cursor"),
    ),
)
Cursors

The Cursor enum has all the possible CSS cursor values.

You may also pass a customCursor argument to set a custom cursor (such as a URL), this will be passed directly to cursor.

Features and bugs

Please file feature requests and bugs at the issue tracker.

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。