FLUTTER ECOSYSTEM

hoomanmmd/animated_switcher_plus

AnimatedSwitcher 的預建轉場效果 [Flutter]

animated_switcher_plus 專案封面
Stars
6
Forks
1
最近推送(UTC)
2026年8月3日
專案狀態
未封存
Hooman GitHub avatar
GITHUB User

Hooman ↗

Mobile Application Developer

語言DartHTMLKotlin

此儲存庫發佈的套件

使用的依賴

依賴清單 3 項
  • flutter{"sdk":"flutter"}
  • flutter_test開發依賴{"sdk":"flutter"}
  • flutter_lints開發依賴^2.0.1

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 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