updateSelectedDesserts method
Implementation
void updateSelectedDesserts(RestorableDessertSelections selectedRows) {
_selectedCount = 0;
for (var i = 0; i < desserts.length; i += 1) {
var dessert = desserts[i];
if (selectedRows.isSelected(i)) {
dessert.selected = true;
_selectedCount += 1;
} else {
dessert.selected = false;
}
}
notifyListeners();
}