Im currently working on a Flutter school project. Im totaly new to Flutter and Dart and have troubles to understand the usage of Equatable package.
I build my Flutter Application using the Bloc-Pattern. In an online course they described the usage of Equatable, and how it helps to make comparison of objects more reliable. But since equatable objects also need to be immutable i dont understand how to work with those objects.
I have the following scenario. Inside my Flutter project i have a Edit-View to change, lets say, AccountInformations. AccountInformations are stored to a DB using Asp.Net backend. In Flutter i call the service to get the AccountInformation, which is also a model class in the Flutter project. The AccountInformation is Equatable since i want to compare it to differen AccountInformation objects.
Now i plan to bind the properties/variables of the AccountInformation-object to the TextFields in the Edit-View. But since the properties are final, i cannot change them.
Now i just see the option, to have a method and create a new AccountInfo object based on the text-fields on "Save" to write it back to the database, or to not make the AccountInfo euqatable.
In my opinion this is way to complicated and im pretty sure that im missing an important part. How would you realize the folowing scenario in your application?
Thanks and regards!