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

flutter_multiple_loaders 封面
套件詳情v1.1.1

flutter_multiple_loaders

一個 Flutter 套件,為您的 Flutter 應用程式提供一組可自訂的載入動畫。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1760
喜歡數
26
Pub 分數
160

安裝套件

flutter pub add flutter_multiple_loaders

套件介紹

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

一個 Flutter 套件,提供多種可自訂的載入動畫,以提升 Flutter 應用的使用者體驗。它提供多種載入器設計,可輕鬆整合至任何專案中,支援所有主要平台,包括 Android、iOS、Web、macOS、Windows 和 Linux。這些載入器輕量、高度可設定,非常適合用於指示進行中的過程,例如資料取得或頁面轉換。透過 pub add 簡單設定,開發者可快速實作吸引人的視覺反饋,無需複雜程式碼。

適用情境

  • 在 API 呼叫期間顯示載入狀態
  • 使用動畫進度指示器增強使用者介面
  • 改進資料處理過程中的使用者回饋
  • 為不同應用部分自訂載入畫面
  • 為刷新指示器增添視覺吸引力

主要特色

  • 多個預建的載入動畫
  • 高度可自訂的外觀
  • 跨平台相容性
  • 與 pubspec.yaml 的輕鬆整合
  • 輕量且高效能
  • 支援圓形與線性載入樣式

適合對象

  • 尋求多樣化載入動畫的開發者
  • 需要一致視覺反饋的應用程式
  • 希望動態加載效果的UI/UX設計師
  • 針對多個平台的專案
  • 初學者尋找簡單但有效的載入器

使用建議

  • 可能需要額外的樣式以保持主題一致性
  • 某些載入器在不同螢幕尺寸上可能需要調整大小
  • 超出基本屬性的自訂功能有限
  • 未針對極高頻率的更新進行優化
  • 依賴外部相依性進行動畫渲染

原始 README

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

Flutter Multiple Loaders

https://pub.dev/packages/flutter_multiple_loaders

A Flutter package providing a collection of customizable loading animations for your Flutter applications.

Define. Get. Set. Done.

🌐 Live Demo

Experience all the loaders in action: Flutter Multiple Loaders Demo

Requirements

  • Flutter SDK >= 1.17.0
  • Dart SDK >= 3.7.2

Features

This package includes multiple loading animation styles with customizable properties:

Standard Loaders
  • Spinner Loader: A classic spinning circular loader
  • Pulse Loader: A circle that pulses in and out
  • Bounce Loader: Multiple dots that bounce up and down
  • Wave Loader: Multiple bars that animate in a wave-like pattern
  • Circle Loader: A circular progress indicator with customizable properties
  • Dots Loader: Multiple dots that fade in and out in sequence
  • Rotating Square Loader: A square that rotates on its center axis
  • Flipping Card Loader: A card that flips in 3D
  • Glowing Loader: A circle with pulsing glow effects and gradient colors
  • Typing Loader: A typing indicator with animated dots, commonly used in chat applications
  • Blinking Loader: A shape (circle, square, triangle, or star) that fades in and out
  • Ripple Loader: Concentric circles that expand outward like ripples on water
  • Heartbeat Loader: A realistic anatomical heart animation with authentic cardiac rhythm patterns
  • Hourglass Loader (new in 1.1.0): A smooth hourglass with Bézier curves and animated sand flow
  • Clock Loader (new in 1.1.0): An analog clock face with rotating hour and minute hands
Innovative Loaders
  • DNA Helix Loader: An animated double helix that rotates in 3D space with connecting "rungs" between the strands
  • Morphing Shape Loader: A shape that smoothly transitions between different geometric forms
  • Galaxy Spiral Loader: A spiral galaxy with stars rotating around a glowing core
  • Particle Vortex Loader: Mesmerizing particles flowing in a vortex pattern with customizable flow speed and colors
  • Fractal Tree Loader: A beautiful animated fractal tree that grows and branches organically
  • Liquid Blob Loader: A morphing liquid-like blob with fluid motion and realistic highlights
  • Page Turning Loader: A book with smoothly turning pages that simulates a realistic reading animation
  • Heartbeat Loader: A realistic anatomical heart animation with authentic cardiac rhythm patterns
  • Neon Pulse Loader: Futuristic cyberpunk-style concentric neon rings with glow effects
🛠️ Developer Utilities (new in 1.1.0)
  • MultipleLoaders.showOverlay — One-line modal loading barrier that blocks user interaction during async tasks
  • LoaderFutureBuilder<T> — Drop-in FutureBuilder wrapper that auto-shows a loader while waiting

All loaders feature:

  • Customizable sizes (extra small to extra large)
  • Custom colors (primary, secondary, tertiary, and quaternary)
  • Adjustable animation speed
  • Optional background colors
  • Animation control (start, stop, reset)

Screenshots

Standard Loaders
Loader Preview Loader Preview
Spinner Loader Spinner Loader Pulse Loader Pulse Loader
Bounce Loader Bounce Loader Wave Loader Wave Loader
Circle Loader Circle Loader Dots Loader Dots Loader
Rotating Square Loader Rotating Square Loader Glowing Loader Glowing Loader
Typing Loader Typing Loader Ripple Loader Ripple Loader
HeartBeat Loader Heartbeat Loader Hourglass Loader (screenshot coming soon)
Clock Loader (screenshot coming soon)
Innovative Loaders Gallery
Loader Preview Loader Preview
DNA Helix Loader DNA Helix Loader Morphing Shape Loader Morphing Shape Loader
Galaxy Spiral Loader Galaxy Spiral Loader Particle Vortex Loader Particle Vortex Loader
Fractal Tree Loader Fractal Tree Loader Liquid Blob Loader Liquid Blob Loader
Flipping Card Loader Flipping Card Loader

Getting started

Add the dependency to your pubspec.yaml:

dependencies:
  flutter_multiple_loaders: ^1.1.0

Then run:

flutter pub get

Usage

Import the package:

import 'package:flutter_multiple_loaders/flutter_multiple_loaders.dart';
Basic Usage

Use any of the loaders with default options:

// Simple spinner animation
SpinnerLoader();

// Pulse animation
PulseLoader();

// Bounce animation
BounceLoader();

// Wave animation
WaveLoader();

// Circle animation
CircleLoader();

// Blinking animation with different shapes
BlinkingLoader();  // default is circle

// Book animation
PageTurningLoader(
  pageCount: 20,
  options: LoaderOptions(
    color: Colors.indigo,
    secondaryColor: Colors.indigoAccent,
    tertiaryColor: Colors.white,
    durationMs: 3500,
  ),
);

// Heartbeat animation
HeartbeatLoader(
  pulseIntensity: 0.4,
  options: LoaderOptions(
    color: Colors.red,
    size: LoaderSize.large,
    durationMs: 2000,
  ),
);

// Hourglass animation (new in 1.1.0)
HourglassLoader(
  options: LoaderOptions(
    color: Colors.amber,
    secondaryColor: Colors.amber.withOpacity(0.35),
    size: LoaderSize.large,
    strokeWidth: 3.0,
    durationMs: 2400,
  ),
);

// Clock animation (new in 1.1.0)
ClockLoader(
  options: LoaderOptions(
    color: Colors.deepPurple,
    secondaryColor: Colors.deepPurpleAccent,
    size: LoaderSize.large,
    strokeWidth: 3.0,
    durationMs: 3000,
  ),
);
🛠️ Developer Utilities (new in 1.1.0)
Loading Overlay Dialog

Display a full-screen loading barrier that blocks user interaction during async tasks:

// Show the overlay
MultipleLoaders.showOverlay(
  context,
  loader: const SpinnerLoader(
    options: LoaderOptions(
      color: Colors.white,
      size: LoaderSize.large,
    ),
  ),
);

// Perform your async work...
await myLongRunningTask();

// Hide the overlay
MultipleLoaders.hideOverlay(context);
LoaderFutureBuilder

A drop-in replacement for FutureBuilder that automatically shows a loader while the future is pending:

LoaderFutureBuilder<String>(
  future: myNetworkRequest(),
  loader: const CircleLoader(
    options: LoaderOptions(
      color: Colors.teal,
      size: LoaderSize.large,
      strokeWidth: 4.0,
    ),
  ),
  builder: (context, data) {
    // Only called when the future completes successfully!
    return Text('Loaded: $data');
  },
)
Customizing Loaders

All loaders accept custom options through the LoaderOptions class:

SpinnerLoader(
  options: LoaderOptions(
    color: Colors.purple,
    size: LoaderSize.large,
    durationMs: 1000,
    loop: true,
  ),
);

// Multi-colored wave loader
WaveLoader(
  barCount: 5,
  options: LoaderOptions(
    color: Colors.blue,
    secondaryColor: Colors.green,
    tertiaryColor: Colors.orange,
    size: LoaderSize.medium,
  ),
);
Controlling Animation Programmatically

Use the LoaderController to control the animation:

class _MyWidgetState extends State<MyWidget> {
  final LoaderController _controller = LoaderController();

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        SpinnerLoader(controller: _controller),

        ElevatedButton(
          onPressed: () => _controller.start(),
          child: Text('Start'),
        ),

        ElevatedButton(
          onPressed: () => _controller.stop(),
          child: Text('Stop'),
        ),

        ElevatedButton(
          onPressed: () => _controller.reset(),
          child: Text('Reset'),
        ),
      ],
    );
  }
}

Interactive Example

The package includes a complete example app that demonstrates all loaders with interactive controls for customization. The example app allows you to:

  • Switch between different loader types via category tabs (Standard / Innovative)
  • Change sizes, colors, and stroke widths via the control panel
  • Control animation duration
  • Start, stop, and reset animations
  • Try interactive Developer Utilities demos (Overlay & FutureBuilder)
  • Copy ready-to-use code snippets for every loader

Check the example folder for more detailed usage examples.

Additional information

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

License

This package is licensed under the MIT License - see the LICENSE file for details.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。