byPath method
Find a article object by given path.
Implementation
SummaryArticle? byPath(String path) {
SummaryArticle? result;
for (final part in parts) {
final root = SummaryArticle(
level: '',
title: '',
articles: part.articles,
);
result = root.filter((e) {
final articlePath = e.path;
return articlePath != null && PathUtils.areIdentical(articlePath, path);
}, skipRoot: true);
if (result != null) {
break;
}
}
return result;
}