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

loading_animations 封面
套件詳情v2.2.0

loading_animations

一個包含一系列簡單但高度可自訂的載入動畫的 Flutter 套件。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
6730
喜歡數
272
Pub 分數
160

安裝套件

flutter pub add loading_animations

套件介紹

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

一個 Flutter 套件,提供一組簡單且高度可自訂的載入動畫,可用於應用程式中。設計用以提升使用者在等待狀態下的體驗,提供流暢且視覺上吸引人的指示器,可輕鬆整合至各種 UI 元件。這些動畫輕量級,並支援多個平台,確保在 Android、iOS、Web、macOS、Windows 及 Linux 上表現一致。自訂選項包含顏色、大小、速度與動畫風格,使其能適應不同設計需求。

適用情境

  • 表單中的加載指示器
  • 啟動畫面
  • 數據獲取狀態
  • 頁面過渡
  • 後台任務進度
  • 自定義旋轉器設計

主要特色

  • 高度可自訂的動畫
  • 支援所有主要平台
  • 輕量且高效能
  • 與 Flutter 小部件的輕鬆整合
  • 多種動畫樣式
  • 可設定的顏色與速度

適合對象

  • 尋求快速加載指示器的開發者
  • 需要一致 UI 反饋的應用程式
  • 希望擁有靈活動畫選項的設計師
  • 針對多個平台的專案
  • 原型設計與快速開發

使用建議

  • 僅限基本動畫類型
  • 可能需要額外的樣式來支援複雜的使用者介面
  • 未針對極高頻率的更新進行優化
  • 最適合簡單的加載場景
  • 無內建的地區化或可存取性功能

原始 README

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

Flutter Loading Animations Pub

A simple yet very customizable set of loading animations for Flutter projects.

Installation

Add the following to your pubspec.yaml file:

...
dependencies:
  ...
  loading_animations: "^2.1.0"
...

Then import the file to your project:

import 'package:loading_animations/loading_animations.dart';

How to use

Choose a loading animation from the list:

Flipping
  • LoadingFlipping.circle()
  • LoadingFlipping.square()
Rotating
  • LoadingRotating.square()
Double Flipping
  • LoadingDoubleFlipping.circle()
  • LoadingDoubleFlipping.square()
Bouncing Grid
  • LoadingBouncingGrid.circle()
  • LoadingBouncingGrid.square()
Filling
  • LoadingFilling.square()
Fading Line
  • LoadingFadingLine.circle()
  • LoadingFadingLine.square()
Bouncing Line
  • LoadingBouncingLine.circle()
  • LoadingBouncingLine.square()
Jumping Line
  • LoadingJumpingLine.circle()
  • LoadingJumpingLine.square()
Bumping Line
  • LoadingBumpingLine.circle()
  • LoadingBumpingLine.square()

Then add the following code:

LoadingFlipping.circle(
  color: Colors.blue,
);

Or you can customize it a bit:

LoadingFlipping.square(
  borderColor: Colors.cyan,
  size: 30.0,
);

Or customize it even more!

LoadingFlipping.circle(
  borderColor: Colors.cyan,
  borderSize: 3.0,
  size: 30.0,
  backgroundColor: Colors.cyanAccent,
  duration: Duration(milliseconds: 500),
);

For more customization, please look inside the loading animation files.

Note: all the animations come ready to go just by calling LoadingDoubleFlipping.square(), for example.

Many basic animations contain .circle() and .square() variations by default.

Examples

Note: the following gifs are not yet updated to reflect version 2.1.0

For a more true experience of the animations and its variations, download the example project and run using flutter run --profile.

LoadingFlipCircle() LoadingRotatingSquare()
LoadingFlipBox() LoadingBouncingGrid()

Contribution

Please feel free to:

  • ask questions
  • report issues and bugs
  • suggest code improvements
  • request new features

Create an issue or a pull request and I will be more than happy to review it and add to the project.

Thanks

This project was heavily based on cssfx

If you like this package, don't forget to hit the ⭐️ button!

Thanks and happy coding 👻

所屬分類

原始碼儲存庫

使用此套件的專案