Skip to content
pubscout

shimmer

4.0.0, released 3 months ago by hunghd.dev

Paints a moving highlight over skeleton placeholders and call-to-action text.

WASM-readyUses material_ui
$ flutter pub add shimmer
Source repository

What it does

Provides a Flutter widget that applies a moving highlight effect using shaders. It is commonly used for creating skeleton screens during loading states or sliding highlights on call-to-action text.

AI-written summary of version 4.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to display skeleton loading placeholder screens for asynchronous data.
  • You want to create a sliding highlight effect on text or buttons like a slide-to-unlock feature.

Skip it when

  • You are wrapping individual rows in separate Shimmer widgets within a long list instead of wrapping the whole list.
  • Your app does not meet the Flutter >=3.44.0 requirement introduced in version 4.0.0.

Strengths

  • Lightweight widget utilizing a ShaderMaskLayer for efficient rendering.
  • Supports customizable gradients, direction, period, loops, and enabled state.

Weaknesses

  • Requires using the standalone material_ui package and Flutter >=3.44.0 in version 4.0.0.
  • Complex child widgets with images or decorated text may render incorrectly because the shader replaces their colors.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

Requires adding the shimmer dependency and the standalone material_ui package (Flutter 3.44+).

Shimmer.fromColors(
  baseColor: Colors.grey.shade300,
  highlightColor: Colors.grey.shade100,
  child: Column(
    children: [
      Container(height: 200, color: Colors.white),
      const SizedBox(height: 16),
      Container(height: 12, color: Colors.white),
    ],
  ),
);

Alternatives

Packages that do the same job and could replace shimmer.

Works with

Packages commonly used together with shimmer: ones it builds on, ones built on it, and its own family.