progress_bar_rounded 1.0.1

SDKflutter
Platformandroidioswindowslinuxmacosweb

this is a rounded progress bar with custom colors

🎯 progress_bar_rounded

A customizable rounded progress bar widget for Flutter with smooth animations, multiple themes, and flexible child widget support.

pub package License: MIT Flutter


✨ Features

  • 🎨 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

📦 Installation

Add this to your pubspec.yaml:

dependencies:
  progress_bar_rounded: ^1.0.1

Then run:

flutter pub get

🚀 Quick Start

import '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),
      ),
    );
  }
}

🎨 Basic Usage

Simple Progress Bar

RoundedProgressBar(
  percent: 65,
  height: 30,
  color: Colors.green,
  backgroundColor: Colors.grey[200]!,
)

With Custom Styling

RoundedProgressBar(
  percent: 80,
  height: 50,
  color: Colors.purple,
  backgroundColor: Colors.grey[100]!,
  borderRadius: BorderRadius.circular(25),
  milliseconds: 800,
  margin: EdgeInsets.symmetric(horizontal: 20),
)

With Child Widgets

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),
)

Reverse Progress Direction

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)),
)

🔧 API Reference

RoundedProgressBar Properties

PropertyTypeDefaultDescription
percentdouble40Progress percentage (0.0 - 100.0)
heightdouble50Height of the progress bar
colorColorRequiredColor of the progress indicator
backgroundColorColorRequiredBackground color of the bar
styleRoundedProgressBarStyle?nullCustom styling object
marginEdgeInsetsGeometry?nullOuter margin of the widget
borderRadiusBorderRadiusGeometry?BorderRadius.circular(12)Corner radius
millisecondsint500Animation duration in milliseconds
reverseboolfalseReverse progress direction
childCenterWidget?nullWidget displayed at center
childLeftWidget?nullWidget displayed on left side
childRightWidget?nullWidget displayed on right side
paddingChildLeftEdgeInsetsGeometry?EdgeInsets.all(16)Left child padding
paddingChildRightEdgeInsetsGeometry?EdgeInsets.all(16)Right child padding

RoundedProgressBarStyle Properties

PropertyTypeDefaultDescription
backgroundProgressColorColor(0xFFBBDEFB)Background progress color
colorProgressColorColor(0xFF42A5F5)Main progress color
colorProgressDarkColorColor(0xFF2980b9)Dark progress color variant
colorBorderColorColor(0xFFEEEEEE)Border color
colorBackgroundIconColorColor(0xFFEEEEEE)Icon background color
borderWidthdouble6Border width
widthShadowdouble6Shadow width

🎭 Built-in Themes

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,
  ),
)

📱 Examples

File Upload Progress

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),
)

Task Completion

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),
)

Loading State

RoundedProgressBar(
  percent: loadingProgress,
  height: 25,
  color: Colors.orange,
  backgroundColor: Colors.grey[100]!,
  milliseconds: 300,
  childCenter: Text(
    "Loading...",
    style: TextStyle(color: Colors.orange, fontSize: 12),
  ),
)

🧪 Testing

Run the test suite:

flutter test

🤝 Contributing

We welcome contributions! Please feel free to submit issues and pull requests.

Development Setup

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


🙏 Acknowledgments

  • Built with ❤️ using Flutter
  • Inspired by modern UI/UX design principles
  • Special thanks to the Flutter community

📞 Support


Made with Flutter ❤️