搜尋套件、儲存庫與 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

所屬分類

原始碼儲存庫

使用此套件的專案