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

套件詳情v0.0.4

animated_visibility

使用 AnimatedVisibility 實現出現和消失的動畫

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
3480
喜歡數
44
Pub 分數
150

安裝套件

flutter pub add animated_visibility

套件介紹

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

AnimatedVisibility 是一個 Flutter 套件,可實現顯示和隱藏元件的平滑動畫。它提供了一種簡單且宣告式的動畫方式,透過可自訂的進入和離開過渡來動畫化可見性變更。此套件支援所有主要平台,包括 Android、iOS、Web、macOS、Windows 和 Linux。以效能與易用性為設計核心,能順暢整合至現有的 Flutter 應用程式中。開發者可透過直覺的屬性控制動畫持續時間、曲線與行為。非常適合建立動態介面,其中視覺反饋能提升使用者體驗。

適用情境

  • 動畫下拉選單
  • 顯示/隱藏載入指示器
  • 建立可收合區段
  • 實現滑入式彈窗
  • 管理入職畫面

主要特色

  • 流暢的進入/退出動畫
  • 可自訂的過渡曲線
  • 支援所有 Flutter 平台
  • 簡單的 API,最小化樣板程式碼
  • 可設定的持續時間與延遲

適合對象

  • 需要視覺反饋的UI組件
  • 動態佈局中的隱藏內容
  • 引導或教學流程
  • 具有條件元素的互動式表單
  • 需要精緻微互動的應用程式

使用建議

  • 多個實例可能影響效能
  • 需要仔細調整動畫持續時間
  • 僅限基於可見性的轉換
  • 不適用於複雜的佈局變更
  • 最佳搭配輕量級組件使用

原始 README

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

Animated Visibility

Animate appearance and disappearance using pre-built effects with the AnimatedVisibility widget.

Getting Started

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  animated_visibility: <latest_version>

In your library add the following import:

import 'package:animated_visibility/animated_visibility.dart';
Basic usage
      AnimatedVisibility(
        visible: _isShow,
        enter: fadeIn() + scaleIn(),
        exit: fadeOut() + slideOutHorizontally(),
        child: <content to show/hide>,
      );

Demo

Sample app demonstrates how simple the usage of the library actually is.

Bugs and Feedback

For bugs, questions and discussions please use the Github Issues.

Credits

animated_visibility is owned and maintained by the Canopas team. You can follow them on X at @canopassoftware for project updates and releases.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。