shimmer_progress_bar 1.0.1 copy "shimmer_progress_bar: ^1.0.1" to clipboard
shimmer_progress_bar: ^1.0.1 copied to clipboard

A customizable linear progress bar with animation, shimmer effect, and percentage indicator for Flutter.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:shimmer_progress_bar/shimmer_progress_bar.dart'; // adjust if local

void main() {
  runApp(const ProgressDemoApp());
}

class ProgressDemoApp extends StatelessWidget {
  const ProgressDemoApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Shimmer Progress Bar Demo',
      theme: ThemeData(primarySwatch: Colors.blue),
      home: const ProgressHomePage(),
    );
  }
}

class ProgressHomePage extends StatefulWidget {
  const ProgressHomePage({super.key});

  @override
  State<ProgressHomePage> createState() => _ProgressHomePageState();
}

class _ProgressHomePageState extends State<ProgressHomePage> {
  double _progress = 0.0;

  void _simulateProgress() {
    if (_progress < 1.0) {
      setState(() {
        _progress += 0.1;
      });
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Shimmer Progress Bar Example')),
      body: Padding(
        padding: const EdgeInsets.all(20.0),
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            ShimmerProgressBar(
              value: _progress,
              height: 18,
              valueColor: Colors.green,
              backgroundColor: Colors.grey.shade300,
              shimmerColor: Colors.white,
              borderRadius: 16,
              shimmerWidth: 40,
              showShimmer: true,
              showPercentage: true,
              alignPercentageToTip: true,
              onProgressComplete: () {
                ScaffoldMessenger.of(context).showSnackBar(
                  const SnackBar(content: Text('Progress complete!')),
                );
              },
              semanticsLabel: 'Loading progress',
            ),
            const SizedBox(height: 24),
            ElevatedButton(
              onPressed: _simulateProgress,
              style: ButtonStyle(
                  backgroundColor: WidgetStateProperty.all(Colors.green)),
              child: const Text(
                'Advance Progress',
                style: TextStyle(color: Colors.white),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
3
likes
160
points
28
downloads

Publisher

unverified uploader

Weekly Downloads

A customizable linear progress bar with animation, shimmer effect, and percentage indicator for Flutter.

Repository (GitHub)
View/report issues

Topics

#progress-bar #shimmer #animation #accessibility #flutter-widget

Documentation

Documentation
API reference

Funding

Consider supporting this project:

github.com
www.buymeacoffee.com

License

MIT (license)

Dependencies

flutter, visibility_detector

More

Packages that depend on shimmer_progress_bar