prevArticle method
Find the previous sibling article.
Implementation
SummaryArticle? prevArticle(SummaryArticle article) {
final level = article.level;
SummaryArticle? prev;
findArticle((a) {
if (a.level == level) {
return true;
}
if (a.ref != null) {
prev = a;
}
return false;
});
return prev;
}