ets_zodiac 0.1.1 copy "ets_zodiac: ^0.1.1" to clipboard
ets_zodiac: ^0.1.1 copied to clipboard

Cross-platform Zodiac SDK — Western & Chinese Zodiac data, calculations, optional icons, and localization for Dart & Flutter.

example/example.dart

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}');
}
0
likes
160
points
107
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Cross-platform Zodiac SDK — Western & Chinese Zodiac data, calculations, optional icons, and localization for Dart & Flutter.

Homepage
Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

More

Packages that depend on ets_zodiac