queryForUpdates method
Query for updates and yield QueryModel if data has changed, this is used by the InformationButton
Implementation
Stream<QueryModel> queryForUpdates() async* {
if (requestLogic.cacheLogic == null) {
throw "You need to call the classes init function first!!";
}
while (true) {
QueryModel data = await requestLogic.getMarkdown(url);
if (data.hasChanged) await notificationIconLogic.shouldNotify(true);
yield data;
await Future.delayed(queryDuration);
}
}