ntp_dart 1.2.1 copy "ntp_dart: ^1.2.1" to clipboard
ntp_dart: ^1.2.1 copied to clipboard

Lightweight Dart package to fetch accurate UTC time from NTP servers with no external dependencies.

Changelog #

1.2.1 #

  • Added isUtc parameter (default false) to AccurateTime.now(), AccurateTime.nowSync(), and AccurateTime.nowToIsoString().
  • Fixed caching logic in AccurateTime to always store UTC and convert to local only when requested.

1.2.0 #

  • Added apiUrl and parseResponse parameters to NtpBase to allow custom API endpoints and response parsing on Web.
  • Added isUtc parameter (default false) to control whether to return UTC or Local time.
  • Implemented latency compensation for both Web and IO.
  • Improved NTP timestamp parsing in IO to support millisecond precision.
  • Added timeout support for Web NTP requests.
  • Updated dependencies: http to ^1.6.0 and intl to ^0.20.2.

1.1.1 #

  • Added AccurateTime.nowSync() method to provide a synchronous time value, useful for UI rendering while the first sync is in progress.
  • Change logic for conditional import based on platform. No breaking API changes.
  • Updated http dependency (previously 1.4.0) to 1.5.0.
  • Refreshed README and examples to reflect the new platform setup and usage notes.

1.0.2 #

  • Update documentation

1.0.1 #

  • Enable flutter web wasm compatibility

1.0.0 #

  • Publish package
4
likes
160
points
555
downloads

Documentation

API reference

Publisher

verified publisherenzodesimone.dev

Weekly Downloads

Lightweight Dart package to fetch accurate UTC time from NTP servers with no external dependencies.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

http, intl

More

Packages that depend on ntp_dart