I've added upon the app's functionality of setting the background gradient based on day/night cycles by implementing more stages. The cycle will now go in the order of: midnight, night, twilight, dawn/dusk, morning/eve, day, midday, and then vice versa. These values are based upon the percentage of the current time from the lastMidnight
, sunrise
, sunset
and nextMidnight
values.
Here are the background gradients I have chosen:
I used just the standard Flutter Color
class for generating these but if you feel like you want to provide better, more custom colours for these stages then go ahead!
Let me know what you think.
enhancement