搜索插件、代码仓与 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

所属分类

源码仓库

使用此插件的项目

暂无相关数据。