A customizable rounded progress bar widget for Flutter with smooth animations, multiple themes, and flexible child widget support.
- π¨ Fully Customizable - Colors, heights, borders, and animations
- β‘ Smooth Animations - Configurable duration with
AnimatedContainer - π Bidirectional Progress - Support for left-to-right and right-to-left progress
- π§© Flexible Child Widgets - Add content to left, right, and center positions
- π Multiple Themes - Built-in color schemes with dark variants
- π± Responsive Design - Adapts to different screen sizes
- π Lightweight - Minimal dependencies, optimized performance
- π§ͺ Well Tested - Comprehensive test coverage
Add this to your pubspec.yaml:
dependencies:
progress_bar_rounded: ^1.0.1Then run:
flutter pub getimport 'package:flutter/material.dart';
import 'package:progress_bar_rounded/progress_bar.dart';
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return RoundedProgressBar(
percent: 75,
height: 40,
color: Colors.blue,
backgroundColor: Colors.grey[300]!,
childCenter: Text(
"75%",
style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
),
);
}
}RoundedProgressBar(
percent: 65,
height: 30,
color: Colors.green,
backgroundColor: Colors.grey[200]!,
)RoundedProgressBar(
percent: 80,
height: 50,
color: Colors.purple,
backgroundColor: Colors.grey[100]!,
borderRadius: BorderRadius.circular(25),
milliseconds: 800,
margin: EdgeInsets.symmetric(horizontal: 20),
)RoundedProgressBar(
percent: 45,
height: 45,
color: Colors.orange,
backgroundColor: Colors.grey[300]!,
childCenter: Text(
"45%",
style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
),
childLeft: Icon(Icons.check_circle, color: Colors.white),
childRight: Icon(Icons.flag, color: Colors.white),
paddingChildLeft: EdgeInsets.all(12),
paddingChildRight: EdgeInsets.all(12),
)RoundedProgressBar(
percent: 70,
height: 35,
color: Colors.red,
backgroundColor: Colors.grey[200]!,
reverse: true, // Progress fills from right to left
childCenter: Text("Reverse 70%", style: TextStyle(color: Colors.white)),
)| Property | Type | Default | Description |
|---|---|---|---|
percent |
double |
40 |
Progress percentage (0.0 - 100.0) |
height |
double |
50 |
Height of the progress bar |
color |
Color |
Required | Color of the progress indicator |
backgroundColor |
Color |
Required | Background color of the bar |
style |
RoundedProgressBarStyle? |
null |
Custom styling object |
margin |
EdgeInsetsGeometry? |
null |
Outer margin of the widget |
borderRadius |
BorderRadiusGeometry? |
BorderRadius.circular(12) |
Corner radius |
milliseconds |
int |
500 |
Animation duration in milliseconds |
reverse |
bool |
false |
Reverse progress direction |
childCenter |
Widget? |
null |
Widget displayed at center |
childLeft |
Widget? |
null |
Widget displayed on left side |
childRight |
Widget? |
null |
Widget displayed on right side |
paddingChildLeft |
EdgeInsetsGeometry? |
EdgeInsets.all(16) |
Left child padding |
paddingChildRight |
EdgeInsetsGeometry? |
EdgeInsets.all(16) |
Right child padding |
| Property | Type | Default | Description |
|---|---|---|---|
backgroundProgress |
Color |
Color(0xFFBBDEFB) |
Background progress color |
colorProgress |
Color |
Color(0xFF42A5F5) |
Main progress color |
colorProgressDark |
Color |
Color(0xFF2980b9) |
Dark progress color variant |
colorBorder |
Color |
Color(0xFFEEEEEE) |
Border color |
colorBackgroundIcon |
Color |
Color(0xFFEEEEEE) |
Icon background color |
borderWidth |
double |
6 |
Border width |
widthShadow |
double |
6 |
Shadow width |
The package includes predefined color schemes:
// Blue theme (default)
RoundedProgressBar(
style: RoundedProgressBarStyle(
backgroundProgress: backgroundProgressDefault,
colorProgress: colorProgressBlue,
colorProgressDark: colorProgressBlueDark,
),
)
// Green theme
RoundedProgressBar(
style: RoundedProgressBarStyle(
colorProgress: colorProgressGreen,
colorProgressDark: colorProgressGreenDark,
),
)
// Red theme
RoundedProgressBar(
style: RoundedProgressBarStyle(
colorProgress: colorProgressRed,
colorProgressDark: colorProgressRedDark,
),
)
// Purple theme
RoundedProgressBar(
style: RoundedProgressBarStyle(
colorProgress: colorProgressPurple,
colorProgressDark: colorProgressPurpleDark,
),
)
// Yellow theme
RoundedProgressBar(
style: RoundedProgressBarStyle(
colorProgress: colorProgressYellow,
colorProgressDark: colorProgressYellowDark,
),
)
// Midnight theme
RoundedProgressBar(
style: RoundedProgressBarStyle(
colorProgress: colorProgressMidnight,
colorProgressDark: colorProgressMidnightDark,
),
)RoundedProgressBar(
percent: uploadProgress,
height: 40,
color: Colors.blue,
backgroundColor: Colors.grey[200]!,
childCenter: Text(
"${uploadProgress.toInt()}%",
style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
),
childLeft: Icon(Icons.upload_file, color: Colors.white),
childRight: Icon(Icons.check_circle, color: Colors.white),
)RoundedProgressBar(
percent: completedTasks / totalTasks * 100,
height: 35,
color: Colors.green,
backgroundColor: Colors.grey[300]!,
childCenter: Text(
"${completedTasks}/$totalTasks",
style: TextStyle(color: Colors.white, fontWeight: FontWeight.w600),
),
childLeft: Icon(Icons.task_alt, color: Colors.white),
)RoundedProgressBar(
percent: loadingProgress,
height: 25,
color: Colors.orange,
backgroundColor: Colors.grey[100]!,
milliseconds: 300,
childCenter: Text(
"Loading...",
style: TextStyle(color: Colors.orange, fontSize: 12),
),
)Run the test suite:
flutter testWe welcome contributions! Please feel free to submit issues and pull requests.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with β€οΈ using Flutter
- Inspired by modern UI/UX design principles
- Special thanks to the Flutter community
- π§ Issues: GitHub Issues
- π Documentation: API Reference
- π¦ Twitter: @yourusername
Made with Flutter β€οΈ