Creating an Entity
Let's create Entity for our note entry with the following properties: title, content, and last updated timestamp.
Since our Entity
will flow between the Presentation and Infrastructure layers via Use Cases powered by Bloc Cubits, it will either need to extend the Equatable class or integrate with the EquatableMixin class to improve the efficiency of BLoC by only emitting new states if and only if there are changes to the entity
.
The equatable package is already made available by the codenic_bloc_use_case package.
Create a file called note_entry.dart
in the note_app/modules/domain/lib/note/entities/
directory:
Last updated