NtpBase class abstract

Implementers

Constructors

NtpBase({String server = 'pool.ntp.org', int port = 123, int timeout = 5, String? apiUrl, DateTime parseResponse(Response)?, bool isUtc = false})
Creates a new NtpBase instance with optional configuration parameters.
const

Properties

apiUrl String?
The URL of the API endpoint to query for time (Web only).
final
hashCode int
The hash code for this object.
no setterinherited
isUtc bool
Whether to return the time in UTC (true) or local time (false).
final
parseResponse DateTime Function(Response)?
A function to parse the response from the API endpoint (Web only).
final
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