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