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

套件詳情v2.0.0

flutter_fadein

一個簡單的 Flutter 小部件,可在小部件掛載後淡入顯示。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1.7萬
喜歡數
56
Pub 分數
140

安裝套件

flutter pub add flutter_fadein

套件介紹

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

一個簡單的 Flutter 小部件,一旦掛載到小部件樹中便會平滑地淡入內容。非常適合透過細微的進入動畫來提升使用者體驗,無需複雜的設定。該小部件會自動處理淡入過渡效果,讓您輕鬆應用於各種 UI 元素。支援所有主要平台,包括 Android、iOS、Web、macOS、Windows 和 Linux,確保在不同裝置上行為一致。適用於引導畫面、動態清單或任何需要溫和出現效果的元件。

適用情境

  • 引導畫面
  • 動態列表項目動畫
  • 載入狀態轉換
  • 啟動畫面退出
  • 頁面過渡

主要特色

  • 掛載時自動漸顯
  • 最小設定
  • 跨平台支援
  • 平滑動畫
  • 輕量級實作

適合對象

  • 初學者 Flutter 開發者
  • 簡單的 UI 增強
  • 對效能敏感的應用
  • 頻繁更新內容的應用

使用建議

  • 不適合複雜的動畫
  • 有限的自訂選項
  • 不支援反向動畫
  • 最適合單一元素的漸隱漸現

原始 README

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

Flutter Fade-In pub package

Simple Flutter widget to fade-in your widgets once they are mounted.

Supports Material & Cupertino widgets.

Required Dart >=2.12 (has null-safety support).

Pub - API Docs - GitHub

Install

Add this as a dependency in your pubspec.yaml:

dependencies:
  flutter_fadein: ^2.0.0

Usage

import 'package:flutter_fadein/flutter_fadein.dart';

FadeIn(
  child: Text("This will be faded-in!"),
  // Optional paramaters
  duration: Duration(milliseconds: 250),
  delay: Duration(milliseconds: 250)
  curve: Curves.easeIn,
)
With Controller

If you need more control over the animation timing, you can use FadeInController:

final controller = FadeInController();

// ...

FadeIn(
  child: Text("This will be faded-in with a controller"),
  controller: controller,
)

// ...

controller.fadeIn();
controller.fadeOut();

Using a controller with not automatically start. You can make it automatically start using FadeInController(autoStart: true). Note that the delay parameter does not work while using a controller, and will therefore raise an exception.

所屬分類

原始碼儲存庫

使用此套件的專案