I have a BLoC (using flutter_bloc) that has multiple possible states and (now, it will probably become more as I add more features to this part of the UI) three different variables it needs to persist between state changes, unless explicitly changed. I find this happens frequently when making apps and I'm looking for a better solution than manually copying the different variables via each state's constructor on every different state change (lots of boilerplate) or (ab)using BLoC observers to copy the variables which haven't changed between different states.
My best idea is to create a single model to hold the different variables and pass the model between state changes, but this feels wrong. What do you guys do?