moon_phase 1.1.3
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 #
- bksubhuti - Background image overlay idea
About #
- Publisher - enoosoft
- Reference - Audrius Meskauskas's MoonView