You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Entity State to manage records in your redux state.
Installation
Add this to your project's pubspec.yaml
dependencies: entity_state: ^1.2.5
Usage
In your redux state
abstract class ReminderState with EntityState<Reminder, int, ReminderState, ReminderStateBuilder> implements Built<ReminderState, ReminderStateBuilder> { // This is mandatory to add BuiltList<int> get ids; // This is mandatory to add BuiltMap<int, Reminder> get entities; ReminderState._(); factory ReminderState([updates(ReminderStateBuilder b)]) = _$ReminderState; static Serializer<ReminderState> get serializer => _$reminderStateSerializer; // This will tell the entity state what is the unique identifier of the model. @override int getId(Reminder data) { return data.id; }}