search method

  1. @override
Future<List<Node>> search(
  1. SearchCriteria criteria
)
override

Search all nodes matching the provided search criteria.

@param criteria the matching criteria (@see ch.fhnw.geiger.localstorage.SearchCriteria for specification of search) @return the nodes matching the criteria @throws StorageException if the storage backend encounters a problem

Implementation

@override
Future<List<Node>> search(SearchCriteria criteria) async {
  List<Node> l = <Node>[];
  for (var e in nodes.entries) {
    if (await criteria.evaluate(e.value)) {
      l.add(e.value);
    }
  }
  return l;
}