updateIsCheckingToday static method
Implementation
static bool updateIsCheckingToday() {
var configFile = getFileConfig();
var lines = configFile.readAsLinesSync();
var lastUpdateIndex = lines.indexWhere(
(element) => element.startsWith('last_update_check:'),
);
if (lines.isEmpty || lastUpdateIndex == -1) {
return false;
}
var dateLatsUpdate = lines[lastUpdateIndex].split(':').last.trim();
var now = _formatter.parse(_formatter.format(DateTime.now()));
return _formatter.parse(dateLatsUpdate) == now;
}