selectAll method

void selectAll(
  1. bool? checked
)

Implementation

void selectAll(bool? checked) {
  for (final dessert in desserts) {
    dessert.selected = checked ?? false;
  }
  _selectedCount = (checked ?? false) ? desserts.length : 0;
  notifyListeners();
}