setAll method

void setAll(
  1. List<Product> products
)

Sets all products with the same order as the input list

Implementation

void setAll(List<Product> products) {
  final List<String> barcodes = <String>[];
  for (final Product product in products) {
    final String barcode = product.barcode!;
    barcodes.add(barcode);
  }
  set(barcodes);
}