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

mouse_parallax 封面
套件詳情v1.1.0

mouse_parallax

一種在多個平台實現基於指針的視差動畫的簡單方法。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
31
喜歡數
165
Pub 分數
150

安裝套件

flutter pub add mouse_parallax

套件介紹

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

Mouse Parallax 是一個 Flutter 套件,可在多個平台(包括行動裝置、Web 和桌面)上實現流暢的指標驅動視差效果。它讓開發者能透過回應滑鼠或觸控輸入來動畫化元件,創造沉浸式視覺體驗,且設定簡單。此套件支援響應式行為,並能順暢整合至現有的 Flutter 專案中。適用於互動式 UI、背景或動態內容版面。

適用情境

  • 互動式網站背景
  • 動態應用介面
  • 視差滾動效果
  • 桌面與網頁動畫
  • 增強使用者參與度
  • 視覺敘事

主要特色

  • 基於指針的視差運動
  • 跨平台支援
  • 簡單的 API 結合
  • 響應式設計相容性
  • 平滑動畫渲染
  • 可自訂靈敏度

適合對象

  • UI/UX 設計師
  • Web 與桌面應用程式開發者
  • 互動式原型建立工具
  • 遊戲化應用建構器
  • 創意數位體驗

使用建議

  • 可能影響低階裝置的效能
  • 需要仔細調整以獲得最佳使用者體驗
  • 不適合靜態內容
  • 僅限指針驅動的互動
  • 最適合視覺豐富的應用程式
  • 過度使用可能會分散使用者注意力

原始 README

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

mouse_parallax

Mouse Parallax

A Pointer-Based Animation Package. The goal of this package is to make mouse and touch based parallax effects as simple as possible.

Setting up

To get started with the Parallax effect, use a ParallaxStack

class MyApp extends StatelessWidget {
 @override
 Widget build(BuildContext context) {
   return MaterialApp(
     home: Scaffold(
       body: ParallaxStack(
         layers: [],
       ),
     ),
   );
 }
}

The layers property takes a list of ParallaxLayers. These layers allow you to define the animatable properties of the stack.

class MyApp extends StatelessWidget {
 @override
 Widget build(BuildContext context) {
   return MaterialApp(
     home: Scaffold(
       body: ParallaxStack(
         layers: [
           ParallaxLayer(
             yRotation: 0.35,
             xOffset: 60,
             child: Center(
               child: Container(
                 width: 250,
                 height: 250,
                 color: Colors.black,
               ),
             ),
           ),
           ParallaxLayer(
             yRotation: 0.35,
             xOffset: 80,
             child: Center(
               child: Container(
                 width: 200,
                 height: 200,
                 decoration: const BoxDecoration(
                   color: Colors.deepOrange,
                 ),
               ),
             ),
           ),
         ],
       ),
     ),
   );
 }
}

That example yields this result:

Parallax image

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。