moon_phase 1.1.3 copy "moon_phase: ^1.1.3" to clipboard
moon_phase: ^1.1.3 copied to clipboard

Flutter plugin that creates moon widgets according to the moon's phase.

moon_phase #

Flutter plugin that creates moon widgets according to the moon's phase.

Usage #

Simple (solid colors) #

MoonWidget.simple(
  date: DateTime.now(),
  size: 64,
  moonColor: Colors.amber,
  earthshineColor: Colors.black87,
)

Image (with background) #

MoonWidget.image(
  date: DateTime.now(),
  backgroundImageAsset: 'assets/moon.png',
  size: 64,
  shadowRatio: 0.8,
  earthshineColor: Colors.black87,
)

Parameters #

Parameter Description
date DateTime to display
size Widget size
pixelSize Shadow rendering precision (smaller = smoother)
moonColor Light side color (simple mode)
earthshineColor Dark side color
backgroundImageAsset Background image path (image mode)
shadowRatio Shadow radius ratio 0.0~1.0 (image mode)

Acknowledgements #

About #

19
likes
160
points
238
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter plugin that creates moon widgets according to the moon's phase.

Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter, flutter_web_plugins, web

More

Packages that depend on moon_phase

Packages that implement moon_phase