Open lukepighetti opened 1 week ago
The .where of the List opyWith actually filters the elements. Maybe a .select would be cool to select items and then apply changes to only those, without modifying the other items.
You can wrap the .$update method for this.
I found the ListCopyWith interface and the CopyWith topic but I'm having a hard time understanding the best approach to reduce this code into something easier to read and write.
operations
timelineMealId
, StringitemId
, and boolignore
timelineMealId
).meal.items(where id ==itemId
).ignore =ignore
was hoping for something like
appState.copyWith.timeline.where((e)=>e.id == timelineMealId).items.where((e)=>e.id == itemId).copyWith(ignore: ignore)