NtpBase constructor
const
NtpBase({})
Creates a new NtpBase instance with optional configuration parameters.
All parameters are optional and have sensible defaults:
serverdefaults to'pool.ntp.org'portdefaults to123timeoutdefaults to5secondsisUtcdefaults tofalse
If apiUrl is provided, parseResponse must also be provided, and vice versa.
Implementation
const NtpBase({
this.server = 'pool.ntp.org',
this.port = 123,
this.timeout = 5,
this.apiUrl,
this.parseResponse,
this.isUtc = false,
}) : assert(
(apiUrl != null) == (parseResponse != null),
'Both apiUrl and parseResponse must be provided together, or neither.',
);