KnowledgeBundleSearch constructor

KnowledgeBundleSearch(
  1. ProjectBundle bundle,
  2. KnowledgeSearchResponse response, {
  3. KnowledgeSearchFreshness freshness = const KnowledgeSearchFreshness(),
})

Implementation

KnowledgeBundleSearch(
  this.bundle,
  this.response, {
  this.freshness = const KnowledgeSearchFreshness(),
}) : matches = List.unmodifiable([
       for (final hit in response.matches)
         KnowledgeCitation._of(
           bundle,
           hit,
           reason: 'match',
           freshness: freshness,
         ),
     ]),
     context = List.unmodifiable([
       for (final hit in response.context)
         KnowledgeCitation._context(bundle, hit, freshness),
     ]);