"When does the Sun rise tomorrow?" sounds like a lookup, but it is a calculation with a lot of small traps. Which day do you mean when the user's local date and the UTC date differ? What do you return in Tromsø in December, when the Sun does not rise at all? Does the observer's height change the answer? And how do you know your numbers are right?
Many apps need these answers: a weather screen, a photography planner, a theme that switches at dusk, a prayer-time library. Most of them do not want a time-zone database or a heavy astronomy dependency just for that.
solar_events is a pure Dart package for solar calculations. It is based on the NOAA solar calculator equations (after Meeus), has no dependencies, and gives explicit results for polar day and polar night.
What it does
Daily events. For a date, a latitude, a longitude and an optional observer elevation, SunTimes gives you sunrise, sunset, solar noon and day length.…