Shimmer Progress Bar

A highly customizable and animated linear progress bar widget for Flutter with a built-in shimmer effect and percentage indicator. Ideal for loading states, visual feedback, and active processes in modern mobile and web apps.

๐Ÿ“ฑ Android

Android Screenshot Android Demo


๐ŸŽ iOS

iOS Screenshot iOS Demo


๐ŸŒ Web

Web Screenshot Web Demo


โœจ Features

  • ๐ŸŒˆ Animated fill with smooth transitions
  • โœจ Optional shimmer effect for active progress
  • ๐Ÿ“Š Configurable percentage display (center or near progress tip)
  • ๐ŸŽจ Customizable colors, dimensions, and text styles
  • โ™ฟ Accessibility with screen reader semantics
  • ๐Ÿงฉ Theme-aware, semantic-friendly, and animation-sensitive
  • ๐Ÿ•ต๏ธ Efficient: shimmer stops when off-screen
  • ๐Ÿงฐ Respects system "reduced motion" settings
  • โœ… Lightweight and easy to integrate

๐Ÿš€ Getting Started

Installation

Add this to your pubspec.yaml:

dependencies:
  shimmer_progress_bar: ^1.0.0

Then run:

flutter pub get

Import

import 'package:shimmer_progress_bar/shimmer_progress_bar.dart';

๐Ÿงช Example

ShimmerProgressBar(
  value: 0.65, // 65%
  height: 14.0,
  valueColor: Colors.blueAccent,
  backgroundColor: Colors.grey.shade300,
  shimmerColor: Colors.white,
  showShimmer: true,
  showPercentage: true,
  alignPercentageToTip: false,
  percentTextStyle: TextStyle(fontSize: 10, fontWeight: FontWeight.bold),
  semanticsLabel: 'Loading progress',
)

๐Ÿ”ง Parameters

Property Type Default Description
value double required Progress value between 0.0 and 1.0
height double 12.0 Height of the progress bar
borderRadius double 20.0 Rounded corners
valueColor Color Colors.green Fill color of the bar
backgroundColor Color Color(0xFFE0E0E0) Background color
shimmerColor Color Color.fromARGB(80, 255, 255, 255) Color of the shimmer gradient
shimmerWidth double 30.0 Width of the shimmer sweep
shimmerDuration Duration Duration(seconds: 2) Duration of shimmer cycle
showShimmer bool true Whether to show shimmer animation
animationDuration Duration Duration(milliseconds: 300) Bar fill animation duration
showPercentage bool true Display percentage inside the bar
alignPercentageToTip bool false Align percentage near the progress tip instead of center
percentTextStyle TextStyle? Custom fallback Style for percentage text
percentageFontColor Color Colors.white Default color for text if no TextStyle is set
minWidthForPercentage double 35.0 Minimum width before showing percentage
percentageBuilder Widget Function(BuildContext, int) null Custom widget for percentage display
includeSemantics bool true Wrap in a Semantics widget for accessibility
semanticsLabel String? 'Progress bar' Custom label for screen readers
onProgressComplete VoidCallback? null Called once when value reaches 100%
respectReducedMotion bool true Auto-disables shimmer on "reduce motion" settings

โ™ฟ Accessibility

  • Uses Semantics to support screen readers
  • Describes current progress (e.g., "75 percent complete")
  • Honors system reduced motion preferences
  • includeSemantics: false disables it if needed

๐Ÿงช Tests

This package currently ships without automated tests, but I plan to add comprehensive widget and integration tests in future updates.

Contributions are welcome! If you're interested in helping write or improve tests, feel free to submit a pull request ๐Ÿ™Œ


๐Ÿ“ฆ Contributing

Found a bug or want to contribute a feature? Feel free to open an issue or submit a PR โ€” especially for tests, improvements, and edge case handling. Let's make this better together ๐Ÿš€!


๐Ÿ™Œ Support My Work

If you find this project helpful, consider supporting me:

Buy Me a Coffee Sponsor on GitHub


๐Ÿ“„ License

MIT License. See LICENSE file for details.


โค๏ธ Maintained by

Walid Kambagha
GitHub โ€ข LinkedIn


Designed for beautiful loading states and modern UI needs โœจ