NtpBase class sealed

Base class for platform-specific NTP (Network Time Protocol) clients.

This abstract class defines the common configuration parameters and interface for retrieving the current UTC time from an NTP source. Concrete implementations (e.g., for mobile/desktop using UDP sockets, or for web using HTTP APIs) should extend this class and provide the platform-specific logic in the now method.

Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
port int
The UDP port used to communicate with the NTP server.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
server String
The hostname or IP address of the NTP server to query.
final
timeout int
The timeout in seconds for the time retrieval operation.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
now() Future<DateTime>
Retrieves the current UTC DateTime from the configured NTP source.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited