FLUTTER ECOSYSTEM

daylight

Get the sunset and sunrise times for a geolocation without having to access any remote api.

Latest version
3.1.0
30-day downloads
8.1K
Likes
49
Pub points
160

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Overview

The daylight package provides accurate sunrise and sunset times for any given geolocation using only local calculations, eliminating the need for external APIs. It leverages precise astronomical algorithms to compute these times based on latitude and longitude, ensuring reliable results across different platforms. Ideal for apps that require time-based features tied to daylight, such as scheduling, reminders, or ambient lighting adjustments. The package is lightweight, cross-platform, and open-source, making it easy to integrate into Flutter projects.

Use cases
  • Sunrise/sunset-based app features
  • Automated lighting controls
  • Daily reminder scheduling
  • Weather and outdoor activity planning
  • Time zone-aware notifications
Key features
  • No remote API required
  • Cross-platform support
  • High accuracy with local calculations
  • Simple integration with Flutter
  • Open-source and actively maintained
Suitable for
  • Developers building location-aware apps
  • Apps needing offline time calculations
  • Projects avoiding third-party dependencies
  • Flutter apps focused on environmental or time-sensitive features
Considerations
  • Requires accurate latitude and longitude input
  • Does not account for local terrain or elevation
  • Limited to basic daylight times (no twilight data)
  • Not suitable for extreme polar regions without additional logic
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add daylight

Categories

Dependencies

Dependency list 1 items

Related projects

No data available yet.