container_pro
A beautiful and customizable Flutter widget that creates elegant gradient containers with titles and subtitles. Perfect for creating eye-catching cards, banners, promotional sections, and decorative UI elements in your Flutter applications.
✨ Features
- 🎨 Beautiful gradient backgrounds - Create stunning containers with customizable two-color gradients
- 📝 Title and subtitle support - Display text content with customizable colors
- 📐 Flexible sizing - Control width and height, with responsive default width
- 🎯 Customizable styling - Adjust padding, colors, text styling, and more
- 💫 Modern design - Built-in rounded corners and shadow effects
- 🔧 Easy to use - Simple API with sensible defaults
📦 Installation
Add container_pro to your pubspec.yaml file:
dependencies:
container_pro:
git:
url: https://github.com/HemantaMeher/container_pro.git
Or if published to pub.dev:
dependencies:
container_pro: ^0.0.2
Then run:
flutter pub get
🚀 Getting Started
Prerequisites
- Flutter SDK >=1.17.0
- Dart SDK ^3.9.2
Import the package
import 'package:container_pro/container_pro.dart';
💻 Usage
Basic Example
import 'package:flutter/material.dart';
import 'package:container_pro/container_pro.dart';
class ContainerProScreen extends StatelessWidget {
const ContainerProScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Container Pro Example')),
body: Center(
child: ContainerPro(
title: "Container Pro",
subTitle: "This is a beautiful container",
color1: Colors.blue,
color2: Colors.purple,
),
),
);
}
}
Advanced Example with Custom Properties
ContainerPro(
height: 150,
width: 350,
title: "Premium Feature",
subTitle: "Unlock all features with premium subscription",
color1: Colors.deepPurple,
color2: Colors.pink,
textColor: Colors.white,
subTitleColor: Colors.white70,
padding: const EdgeInsets.all(20),
)
Responsive Example
ContainerPro(
height: 200,
// width is optional - defaults to 98% of screen width
title: "Welcome Back!",
subTitle: "You have 5 new notifications",
color1: Colors.blue.shade400,
color2: Colors.cyan.shade300,
)
📋 Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
height |
double |
120 |
Height of the container |
width |
double? |
98% of screen width |
Width of the container (optional) |
color1 |
Color? |
Colors.blue |
First gradient color |
color2 |
Color? |
Colors.lightBlueAccent |
Second gradient color |
title |
String |
"Title" |
Main title text |
textColor |
Color? |
Colors.white |
Color of the title text |
subTitle |
String |
"Sub Title" |
Subtitle text |
subTitleColor |
Color? |
Colors.white70 |
Color of the subtitle text |
padding |
EdgeInsetsGeometry? |
EdgeInsets.all(16) |
Internal padding of the container |
🎯 Use Cases
- Dashboard cards
- Feature banners
- Promotional sections
- Notification cards
- User profile headers
- App intro screens
📚 Additional Information
Repository
This package is available on GitHub: https://github.com/HemantaMeher/container_pro
Contributing
Contributions are welcome! Feel free to open issues or submit pull requests.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This package is currently under development. License details will be added soon.
Author
Hemanta Meher
- GitHub: @HemantaMeher
Version
Current version: 0.0.2
For more information and updates, check the CHANGELOG.md file.
⭐ If you like this package, please give it a star on GitHub!
Libraries
- container_pro
- A beautiful Flutter widget package for creating elegant gradient containers.