custom_progressbar 2.0.1 copy "custom_progressbar: ^2.0.1" to clipboard
custom_progressbar: ^2.0.1 copied to clipboard

A custom progressbar package for circular progress indicator

pub package likes

Custom ProgressBar #

๐Ÿš€ A lightweight and customizable circular progress bar for Flutter.

Supports flexible sizing, custom center widgets (Text, Icon, Image), and full theming control.


โœจ Features #

  • โœ… Simple and clean API
  • ๐ŸŽฏ Custom center widget (Icon, Text, Image, etc.)
  • ๐ŸŽจ Custom colors & stroke width
  • ๐Ÿ“ฑ Lightweight & easy to use
  • ๐Ÿ”„ Backward compatibility with legacy API

๐Ÿ“ฆ Installation #

Add this to your pubspec.yaml:

dependencies:
  custom_progressbar: 2.0.0

๐Ÿš€ Getting Started #

Import the package:
import 'package:custom_progressbar/custom_progressbar.dart';

๐Ÿ“ธ Preview #

Default ProgressBar #

Default

Custom Colors #

Colors

With Icon Center #

Icon

With Text Center #

Text

With Progress Value #

Progress

With Image Center #

Image


๐Ÿงช Example #

Check the /example folder for a complete working app.

๐Ÿš€ Usage #

1. Basic #

Center(
  child: ProgressBar(),
)

2. Custom Colors #

ProgressBar(
  size: 50,
  progressColor: Colors.amber,
  progressBackgroundColor: Colors.green,
)

3. With Icon #

ProgressBar(
  size: 50,
  progressColor: Colors.amber,
  progressBackgroundColor: Colors.green,
  center: Icon(Icons.g_mobiledata_rounded),
)

4. With Text #

ProgressBar(
  size: 80,
  progressColor: Colors.amber,
  progressBackgroundColor: Colors.green,
  center: Text(
    'Progress',
    style: TextStyle(fontSize: 12),
  ),
)

5. With Progress Value #

ProgressBar(
  size: 80,
  progressColor: Colors.amber,
  progressBackgroundColor: Colors.green,
  progressStrokeWidth: 6,
  progress: 0.8,
  center: Text(
    'Progress',
    style: TextStyle(fontSize: 12),
  ),
)

6. With Image #

ProgressBar(
  size: 90,
  progressColor: Colors.amber,
  progressBackgroundColor: Colors.green,
  progressStrokeWidth: 2,
  center: Image.asset('assets/img.png'),
)

โš™๏ธ Parameters (New API) #

Parameter Description
size Size of the progress bar (width & height)
progress Value from 0.0 to 1.0
center Widget displayed in center (Text, Icon, Image, etc.)
progressColor Color of progress indicator
progressBackgroundColor Background track color
progressStrokeWidth Thickness of progress

๐Ÿ”„ Migration Guide #

Old API (Deprecated) #

ProgressBar(
containerHeight: 40,
containerWidth: 40,
progressColor: Colors.red,
boxFit: BoxFit.contain,
iconHeight: 30,
iconWidth: 30,
imageFile: 'assets/icon.png',
progressStrokeWidth: 3.0,
progressHeight: 50,
progressWidth: 50,
),

ProgressBar(
  size: 40,
  progress: 0.7,
  progressStrokeWidth: 3.0,
  center: Image.asset('assets/icon.png'),
)

โš ๏ธ Deprecated API (Legacy Support) #

The old API is still supported for backward compatibility, but not recommended for new projects.

Mapping to New API #

Old API New API
containerHeight, containerWidth size
imageFile center: Image.asset()
iconHeight, iconWidth handled inside center
boxFit handled inside center
progressHeight, progressWidth auto-managed

๐Ÿ“Œ Notes #

  • progress value should be between 0.0 and 1.0
  • Values outside this range will be clamped internally
  • Use center for flexible content instead of imageFile

๐Ÿ’ก Upcoming Features #

  • ๐ŸŽจ Gradient support
  • โšก CustomPainter-based rendering
  • ๐ŸŽฌ Smooth animations
  • ๐Ÿ“Š Multi-segment progress
  • ๐Ÿ”„ Clockwise / Anti-clockwise progress

โค๏ธ Support #

If you like this package, consider giving it a โญ on GitHub!

๐Ÿ“„ License #

MIT License ยฉ 2026 Rahul Kushwaha

4
likes
160
points
152
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A custom progressbar package for circular progress indicator

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on custom_progressbar