ets_zodiac 0.1.0
ets_zodiac: ^0.1.0 copied to clipboard
Cross-platform Zodiac SDK — Western & Chinese Zodiac data, calculations, optional icons, and localization for Dart & Flutter.
import 'package:ets_zodiac/ets_zodiac.dart';
void main() {
print('--- Western Zodiac ---');
final western = getWesternSign(3, 21);
print('Sign: ${western.sign.name}');
print('Element: ${western.sign.element}');
print('Modality: ${western.sign.modality}');
print('\n--- Chinese Zodiac ---');
final date = DateTime(2024, 1, 1);
final chinese = getChineseZodiacByDate(date);
// January 1st, 2024 is still the Rabbit year (Before CNY)
print('Animal: ${chinese.animal.name}');
print('Element: ${chinese.element}');
print('Yin/Yang: ${chinese.yinYang}');
print('\n--- Localization (Spanish) ---');
final localizedWestern =
getWesternSign(3, 21, options: const WesternOptions(locale: 'es'));
print('Sign (ES): ${localizedWestern.localizedName}');
print('\n--- Icons ---');
final westernWithIcon = getWesternSign(3, 21);
print('Icon SVG: ${westernWithIcon.icon?.svg}');
}