getProductsByLocation method

List<Product> getProductsByLocation(
  1. String location
)

Implementation

List<Product> getProductsByLocation(String location) {
  return productBox.values.where((product) =>
    product.location != null &&
    product.location!.toLowerCase().contains(location.toLowerCase())
  ).toList();
}