T0TTimer constructor
T0TTimer({})
Implementation
T0TTimer({
required this.serial,
this.duration,
Duration? syncInterval,
Map<String, dynamic>? meta,
bool listen = true,
}) : syncInterval = syncInterval ?? const Duration(seconds: 5),
meta = meta ?? <String, dynamic>{},
_startedAt = DateTime.now() {
if (listen) {
_disposeListener = Tang0Channel.addGListener(channelId, _handleMessage);
} else {
_disposeListener = () {};
}
_startPeriodicSync();
}