Search packages, repositories and app categories

Package detailsv3.1.0

daylight

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

AndroidiOSWebmacOSWindowsLinux
30-day downloads
11.1K
Likes
49
Pub points
150

Install package

flutter pub add daylight

Package Overview

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

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

Categories

Dependencies

Dependency list 1 items

Projects using this package