搜索插件、代码仓与 APP 分类

animated_switcher_plus 封面
插件详情v1.5.1

animated_switcher_plus

AnimatedSwitcher 的预构建转换效果,例如翻转、缩放和位移

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
2000
喜欢数
58
Pub 分数
160

安装插件

flutter pub add animated_switcher_plus

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

AnimatedSwitcherPlus 为 Flutter 的 AnimatedSwitcher 提供了预构建的过渡效果,包括翻转、缩放和位移动画。它简化了在 widget 树中替换 widget 时实现流畅视觉过渡的实现。设计用于以最少的代码增强用户体验,通过提供即用型动画扩展 AnimatedSwitcher,高效处理跨平台的常见 UI 变化。非常适合需要重要视觉反馈的动态界面。

适合场景

  • 动画化UI元素替换
  • 在动态列表中创建平滑过渡
  • 增强导航或状态更改
  • 改进交互组件中的视觉反馈
  • 使用动态内容构建响应式仪表板

主要特点

  • 预构建翻转过渡
  • 缩放动画
  • 基于翻译的过渡
  • 与 AnimatedSwitcher 的轻松集成
  • 跨平台支持(Android、iOS、Web、macOS、Windows、Linux)

适合对象

  • 寻求快速过渡效果的开发者
  • UI/UX 设计师实现动画界面
  • 需要动态内容更新的应用程序
  • 专注于精致的视觉交互的项目
  • Flutter 初学者探索动画

使用建议

  • 限于预定义的过渡
  • 可能需要额外的样式来适应复杂布局
  • 不适用于高度自定义的动画逻辑
  • 性能取决于过渡的复杂性
  • 最好与稳定的 widget 状态一起使用

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Prebuilt transitions for Animated Switcher such as flip, zoom and translation.

AnimatedSwitcherPlus

Features

  • Easily animate between two widgets
  • No need to provide both the first and second child simultaneously, unlike similar packages

Transitions

  • AnimatedSwitcherPlus.blur
  • AnimatedSwitcherPlus.flipX
  • AnimatedSwitcherPlus.flipY
  • AnimatedSwitcherPlus.zoomIn
  • AnimatedSwitcherPlus.zoomOut
  • AnimatedSwitcherPlus.translationLeft
  • AnimatedSwitcherPlus.translationRight
  • AnimatedSwitcherPlus.translationTop
  • AnimatedSwitcherPlus.translationBottom
  • AnimatedSwitcherPlus.wipeX ( Suitable for same-size widgets )
  • AnimatedSwitcherPlus.wipeY ( Suitable for same-size widgets )
  • AnimatedSwitcherPlus.revealX
  • AnimatedSwitcherPlus.revealY
  • AnimatedSwitcherPlus.revealCircular
  • AnimatedSwitcherPlus.wiggleRadial

Usage

AnimatedSwitcherPlus.flipX(  
 duration: const Duration(milliseconds: 1500),
 child: _showFirstChild ?
  const Text('Primary Text', key: ValueKey(0)) :
  const Text('Secondary Text', key: ValueKey(1)),
);  

Note: If you are using the same type of widget, change the child key to notify the AnimatedSwitcher that the child has changed. Otherwise, the transition will not occur

所属分类

源码仓库

使用此插件的项目