isTimestampUpdated method
Implementation
Future<bool> isTimestampUpdated(String key, int newUpdatedTimestamp) async {
var prefs = await SharedPreferences.getInstance();
int? updatedTimestamp = prefs.getInt(key);
prefs.setInt(key, newUpdatedTimestamp);
if (updatedTimestamp != null) {
if(newUpdatedTimestamp > updatedTimestamp) {
return true;
}
return false;
}
return true;
}