update method
Update content from your source
Implementation
@mustCallSuper
Future<void> update(String identifier, {bool checkAfterUpdate = true}) async {
if (_isUpdating[identifier] == null) {
_isUpdating[identifier] = contentGetter(identifier);
}
var content = await _isUpdating[identifier]!;
if (content != null) {
if (_cacheDates.containsKey(identifier)) {
_cacheDates.remove(identifier);
}
_contents[identifier] = content;
_cacheDates[identifier] = content.cacheTime.millisecondsSinceEpoch;
}
if (checkAfterUpdate) {
await _checkNeedsRemove();
}
//ignore: unawaited_futures
_isUpdating.remove(identifier);
return;
}