Contact Detail BLoC
Component Detail
Service Layer
medium complexity
mobile
1
Dependencies
2
Dependents
2
Entities
0
Integrations
Description
BLoC managing the complete state machine for the contact detail and edit flow across both screens. Drives state transitions from loading through viewing, editing, saving, and error or rollback states. Coordinates optimistic updates and delegates all API calls to Contact Service.
contact-detail-bloc
Responsibilities
- Manage loading → loaded → editing → saving → saved/error state machine
- Coordinate optimistic state updates and trigger rollback on service errors
- Emit granular states enabling conditional rendering in both detail and edit screens
- Enforce role-context at state level to drive field-visibility decisions in the UI
Interfaces
ContactDetailBloc({required ContactService contactService})
add(LoadContactEvent(String contactId))
add(EnterEditModeEvent())
add(SaveContactEvent(ContactUpdateDto data))
add(CancelEditEvent())
stream -> ContactDetailState
Relationships
Dependents (2)
Components that depend on this component
Related Data Entities (2)
Data entities managed by this component