パッケージ、リポジトリ、アプリカテゴリを検索

fade_shimmer のカバー
パッケージ詳細v2.4.0

fade_shimmer

最新のFacebookロードスケルトンUIのようなロード効果を実装するための、滑らかなフェードトランジションを持つフェードシャイマー・ライブラリです。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
7730
いいね数
225
Pub ポイント
160

パッケージをインストール

flutter pub add fade_shimmer

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Fade Shimmer は、Facebook のスケルトン UI をインスピレーションにした滑らかでアニメーションされたローディング効果を提供する Flutter パッケージです。フェードトランジションを使用して、コンテンツの読み込み状態に適した視覚的に魅力的なプレースホルダーを作成します。このライブラリは複数のプラットフォームをサポートし、既存の Flutter アプリにシームレスに統合できます。カスタマイズ可能な持続時間、色、シャイマーの方向により、データ取得中のユーザー体験が向上します。軽量な設計により、パフォーマンスへの影響を最小限に抑えながら、現代的で洗練されたローディングアニメーションを提供します。

用途

  • プレースホルダースクリーンの読み込み
  • リストとカードのスケルトンUI
  • コンテンツ読み込みインジケーター
  • アプリオンボーディング画面
  • 動的データフェッチの表示
  • ネットワーク遅延中のUXの向上

主な機能

  • スムーズなフェードトランジションアニメーション
  • カスタマイズ可能なきらめきの方向
  • アニメーションの持続時間の設定可能
  • 複数のプラットフォームをサポートしています
  • 軽量で効率的
  • 既存のウィジェットとの簡単な統合

適している対象

  • 現代のUIを構築する開発者
  • 洗練されたロード状態を必要とするアプリ
  • UXの一貫性を重視するチーム
  • スケルトンプレースホルダを使用するプロジェクト
  • Flutter初心者がアニメーションを探求しています

注意事項

  • 低価格端末での最適なパフォーマンスには調整が必要になる場合があります
  • 基本的なアニメーションプロパティを超えるカスタマイズは限られている
  • 複雑なインタラクティブな読み込みシナリオには適していません
  • Flutter のレンダリングパイプラインに依存しています
  • 静的または予測可能なレイアウト構造と併用するのが最適です

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

FadeShimmer

pub package License: MIT

A customizable Flutter package that provides elegant shimmer loading effects with smooth fade transitions. Perfect for creating skeleton screens while your content is loading.

Demo

FadeShimmer Demo

Features

  • 🎨 Customizable colors and dimensions
  • 🌓 Built-in light and dark themes
  • ⏱️ Configurable animation duration
  • 🌊 Support for staggered animations with delay parameter
  • 🔄 Synchronized animations across multiple shimmer elements
  • 🔘 Convenient factory for creating circular shimmer effects

Installation

Add fade_shimmer to your pubspec.yaml file:

dependencies:
  fade_shimmer: ^2.3.0

Run the following command to install:

flutter pub get

Usage

Import the package
import 'package:fade_shimmer/fade_shimmer.dart';
Basic Usage
Create a rectangular shimmer
FadeShimmer(
  height: 8,
  width: 150,
  radius: 4,
  fadeTheme: FadeTheme.light,
)
Create a circular shimmer (for avatars/profile pictures)
FadeShimmer.round(
  size: 60,
  fadeTheme: isDarkMode ? FadeTheme.dark : FadeTheme.light,
)
Custom colors
FadeShimmer(
  height: 8,
  width: 150,
  radius: 4,
  highlightColor: Color(0xffF9F9FB),
  baseColor: Color(0xffE6E8EB),
)
Advanced Usage
Staggered animation effect

Create a wave-like loading effect by adding delays to each shimmer element:

Column(
  children: [
    FadeShimmer(
      height: 8,
      width: 150,
      radius: 4,
      millisecondsDelay: 0,
      fadeTheme: FadeTheme.light,
    ),
    SizedBox(height: 8),
    FadeShimmer(
      height: 8,
      width: 170,
      radius: 4,
      millisecondsDelay: 300, // 300ms delay
      fadeTheme: FadeTheme.light,
    ),
    SizedBox(height: 8),
    FadeShimmer(
      height: 8,
      width: 120,
      radius: 4,
      millisecondsDelay: 600, // 600ms delay
      fadeTheme: FadeTheme.light,
    ),
  ],
)
Changing animation duration

You can change the global animation duration for all shimmer widgets:

// Change animation duration to 3 seconds (default is 1 second)
FadeShimmer.animationDurationInMillisecond = 3000;

Note: This change affects all FadeShimmer widgets in your application.

Customization

Available Properties
Property Type Description
width double Width of the shimmer container (required)
height double Height of the shimmer container (required)
radius double Border radius of the shimmer container (default: 0)
fadeTheme FadeTheme Predefined theme (light or dark)
highlightColor Color The brighter color that the shimmer transitions to
baseColor Color The darker color that the shimmer starts with
millisecondsDelay int Delay before the animation starts (default: 0)
Predefined Themes
  • FadeTheme.light - Light gray colors suitable for light backgrounds
  • FadeTheme.dark - Dark gray colors suitable for dark backgrounds

Example Project

Check out the example directory for a complete sample application using FadeShimmer.

Compatibility

  • Supports Flutter 3.0 and above
  • Null safety compatible
  • Works on all platforms (Android, iOS, Web, Desktop)

Contributing

Contributions are welcome! If you find a bug or want a feature, please open an issue on the GitHub repository.

License

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

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト