processSummary function
Implementation
void processSummary(Document document, SnapView view) {
if (view.summary != 'N/A') {
return;
}
if (document.head != null) {
final metas = document.head!.children
.where((element) =>
element.localName == 'meta' &&
element.attributes['name'] == 'description')
.toList();
if (metas.isNotEmpty) {
view.summary = metas.first.attributes['content']!;
}
}
}