filter method

bool filter(
  1. Rock rock
)

Whether the given rock matches the current query.

Implementation

bool filter(Rock rock) => rock.name.toLowerCase().contains(query)
  || rock.description.toLowerCase().contains(query);