kundali_chart 0.0.1
kundali_chart: ^0.0.1 copied to clipboard
A comprehensive Flutter package for creating beautiful and customizable Vedic astrology charts (Kundali/Birth Charts). Perfect for astrology apps with dark mode support.
import 'package:flutter/material.dart';
import 'package:kundali_chart/kundali_chart.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
),
home: MyHomePage(title: 'Flutter Demo Kundali Chart Page'),
);
}
}
class MyHomePage extends StatelessWidget {
MyHomePage({super.key, required this.title});
final String title;
// Planet positions for Nov 9, 1998, 8:02 AM, Kathmandu (27.7172°N, 85.3240°E)
final houses = <List<String>>[
['Sa '],
['Ra'],
['Mo'],
[],
['Ma'],
['Su\nMe'],
['Ve'],
['Ke'],
[],
['Ju'],
[],
[],
];
// Vedic astrology house labels with Sanskrit names
final houseLabels = <String>[
'1\nLagna\nDhanus',
'2\nDhana\nMakar',
'3\nSahaja\nKumbh',
'4\nMeen',
'5\nMesh',
'6,Ripu\nVrish',
'7\nKalatra\nMithun',
'8\nAyu\nKark',
'9\nDharma\nSimha',
'10\nKarma\nKanya',
'11\nLabha\nTula',
'',
];
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: HoroscopeChart(
houseLabels: [...houseLabels],
houses: houses,
strokeColor: Colors.red,
lineWidth: 0.8,
houseLabelStyle: TextStyle(
fontSize: 10,
color: Colors.black87,
fontWeight: FontWeight.w400,
),
planetStyle: TextStyle(fontSize: 12, color: Colors.black87),
),
),
);
}
}