reload method
Reload all paths, optionally showing loading indicator
Implementation
Future<void> reload({
bool showLoading = false,
bool notifiable = true,
}) async {
if (showLoading) {
_loading = true;
notifyListeners();
}
try {
for (final path in paths) {
if (_symmetricPaths.contains(path)) {
await _load(path, reload: true);
} else {
_load(path, reload: true);
}
}
if (showLoading) _loading = false;
if (notifiable || showLoading) notifyListeners();
log("all symmetric properties reloaded!");
if (_delegate != null) await _delegate!.loaded();
_callback?.call();
} catch (msg) {
if (_logThrowEnabled) rethrow;
log(msg);
}
}