Kundali Chart
🏛️ Kundali Chart 🏛️
A comprehensive Flutter package for creating beautiful and highly customizable Vedic astrology charts (Kundali/Birth Charts). Perfect for astrology applications, educational tools, and spiritual apps.
📸 Preview
Beautiful Vedic astrology birth chart with customizable styling
🌟 Features
- 🎯 Birth Chart Widget: Ready-to-use Vedic astrology birth charts
- 🎨 Horoscope Chart Widget: Fully customizable horoscope chart with flexible styling
- 🏷️ House Labels: Built-in support for Sanskrit house names and custom labels
- 🪐 Planet Placement: Accurate visual representation of planetary positions
- 🌙 Dark Mode Support: Seamless theme switching with built-in dark/light mode extensions
- ⚙️ Highly Customizable: Complete control over colors, line widths, text styles, and layout
- 📱 Responsive Design: Works perfectly on all screen sizes
- 🚀 Performance Optimized: Efficient custom painters for smooth rendering
📦 Installation
Add kundali_chart to your pubspec.yaml:
dependencies:
kundali_chart: ^0.0.1
Install it:
flutter pub get
Import it:
import 'package:kundali_chart/kundali_chart.dart';
🚀 Quick Start
Simple Birth Chart
import 'package:flutter/material.dart';
import 'package:kundali_chart/kundali_chart.dart';
class AstrologyPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
// Define planetary positions for 12 houses
final houses = <List<String>>[
['Sa'], // House 1: Saturn
['Ra'], // House 2: Rahu
['Mo'], // House 3: Moon
[], // House 4: Empty
['Ma'], // House 5: Mars
['Su', 'Me'], // House 6: Sun and Mercury
['Ve'], // House 7: Venus
['Ke'], // House 8: Ketu
[], // House 9: Empty
['Ju'], // House 10: Jupiter
[], // House 11: Empty
[], // House 12: Empty
];
return Scaffold(
appBar: AppBar(title: Text('Birth Chart')),
body: Center(
child: Padding(
padding: EdgeInsets.all(16.0),
child: BirthChart(
houses: houses,
houseLabels: [
'1\nLagna\nDhanus', // Ascendant/Sagittarius
'2\nDhana\nMakar', // Wealth/Capricorn
'3\nSahaja\nKumbh', // Siblings/Aquarius
'4\nMeen', // Home/Pisces
'5\nMesh', // Children/Aries
'6\nRipu\nVrish', // Enemies/Taurus
'7\nKalatra\nMithun', // Marriage/Gemini
'8\nAyu\nKark', // Longevity/Cancer
'9\nDharma\nSimha', // Religion/Leo
'10\nKarma\nKanya', // Career/Virgo
'11\nLabha\nTula', // Gains/Libra
'12\nVyaya\nVrish', // Losses/Scorpio
],
),
),
),
);
}
}
Advanced Customization
HoroscopeChart(
houses: planetaryData,
strokeColor: Colors.deepPurple,
lineWidth: 1.5,
paddingFactor: 0.85,
houseLabelStyle: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w600,
color: Colors.indigo,
),
planetStyle: TextStyle(
fontSize: 13,
fontWeight: FontWeight.bold,
color: Colors.orange,
),
textStyle: TextStyle(
fontSize: 10,
color: Colors.black87,
),
)
Dark Mode Integration
// Automatic dark mode support
BirthChart(
houses: houses,
// Colors automatically adapt to current theme
)
// Or use theme extensions
Container(
color: context.isDarkMode ? Colors.black : Colors.white,
child: HoroscopeChart(
houses: houses,
strokeColor: context.isDarkMode ? Colors.white70 : Colors.black87,
// ... other properties
),
)
🎨 Visual Showcase
Standard Chart Default styling with traditional layout |
Different Chart Variations
- 🌅 Light Theme: Clean, traditional appearance with high contrast
- 🌙 Dark Theme: Eye-friendly dark mode with adjusted colors
- 🎨 Custom Styling: Personalized color schemes and fonts
- 📱 Responsive: Adapts beautifully to any screen size
For developers: Add your own screenshot images to the
screenshots/folder to showcase different configurations.
📚 API Reference
Core Widgets
BirthChart
A ready-to-use birth chart widget with intelligent defaults and dark mode support.
BirthChart({
Key? key,
List<String>? houseLabels, // Custom house labels
List<List<String>>? houses, // Planetary positions
})
HoroscopeChart
A fully customizable horoscope chart widget for advanced use cases.
HoroscopeChart({
Key? key,
required List<List<String>> houses, // Planetary data (required)
required Color strokeColor, // Chart line color
TextStyle? textStyle, // General text styling
TextStyle? houseLabelStyle, // House label styling
TextStyle? planetStyle, // Planet text styling
double lineWidth = 1.0, // Line thickness
double paddingFactor = 0.8, // Chart padding
List<String>? houseLabels, // Optional house labels
})
Theme Extensions
Convenient extensions for theme management:
context.isDarkMode // Boolean: true if dark theme
context.theme // Current ThemeData
context.colorScheme // Current ColorScheme
context.textTheme // Current TextTheme
🪐 Planet Abbreviations
Standard Vedic astrology abbreviations supported:
| Abbreviation | English | Sanskrit | Element |
|---|---|---|---|
Su |
Sun | Surya | Fire |
Mo |
Moon | Chandra | Water |
Ma |
Mars | Mangal | Fire |
Me |
Mercury | Budh | Earth |
Ju |
Jupiter | Guru | Air |
Ve |
Venus | Shukra | Water |
Sa |
Saturn | Shani | Air |
Ra |
Rahu | North Node | Shadow |
Ke |
Ketu | South Node | Shadow |
🏠 House System
Traditional Vedic 12-house system with Sanskrit names:
| House | English | Sanskrit | Significance |
|---|---|---|---|
| 1 | Ascendant | Lagna | Self, Personality |
| 2 | Wealth | Dhana | Money, Family |
| 3 | Siblings | Sahaja | Communication, Courage |
| 4 | Home | Sukha | Mother, Property |
| 5 | Children | Putra | Creativity, Romance |
| 6 | Enemies | Ripu | Health, Service |
| 7 | Marriage | Kalatra | Partnership, Spouse |
| 8 | Longevity | Ayu | Transformation, Occult |
| 9 | Religion | Dharma | Luck, Higher Learning |
| 10 | Career | Karma | Profession, Status |
| 11 | Gains | Labha | Income, Friends |
| 12 | Losses | Vyaya | Expenses, Spirituality |
💡 Example App
The package includes a comprehensive example demonstrating:
- Basic birth chart implementation
- Custom styling and theming
- Planetary position handling
- Responsive design patterns
- Dark/light mode integration
Run the Example
git clone https://github.com/LeanQChris/kundali_chart.git
cd kundali_chart/example
flutter pub get
flutter run
The example shows a birth chart for November 9, 1998, 8:02 AM, Kathmandu, Nepal.
🎯 Use Cases
Perfect for building:
- 📱 Astrology Mobile Apps - Personal horoscope applications
- 🌐 Web Astrology Platforms - Online chart calculation services
- 🎓 Educational Tools - Teaching Vedic astrology concepts
- 🔮 Spiritual Apps - Meditation and spiritual guidance apps
- 📊 Chart Analysis Tools - Professional astrology software
🛣️ Roadmap
Future enhancements planned:
Multiple chart styles (South Indian, Western)Transit and progression overlaysAspect line visualizationExport to PDF/Image functionalityAnimation support for planetary movementsDasha period indicatorsMulti-language support
🤝 Contributing
We welcome contributions! Here's how you can help:
- 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
Contributing Screenshots 📸
Help showcase the package by contributing screenshots:
- Create beautiful chart configurations using the package
- Take high-quality screenshots (400x400px recommended)
- Add them to the
screenshots/directory - Update the README showcase section
- Submit a PR with your visual contributions
Development Setup
git clone https://github.com/LeanQChris/kundali_chart.git
cd kundali_chart
flutter pub get
flutter test
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
⭐ Support
If this package helped you, please consider:
- ⭐ Starring the repository
- 🐛 Reporting bugs and issues
- 💡 Suggesting new features
- 📢 Sharing with other developers
📞 Contact
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Package: pub.dev Package
Made with ❤️ for the Flutter and Astrology communities.