Service Layer medium complexity mobile
1
Dependencies
2
Dependents
0
Entities
0
Integrations

Description

Flutter BLoC managing all state for the Profile and Profile Settings screens. Processes events such as load profile, submit edit, and change setting, emitting corresponding states (loading, loaded, editing, error, saved). Coordinates between the UI layer and Profile Service, ensuring consistent state transitions.

Feature: Profile Data & Settings

profile-bloc

Responsibilities

  • Handle LoadProfile, SubmitProfileUpdate, and UpdateSetting events
  • Emit ProfileLoading, ProfileLoaded, ProfileEditing, ProfileError, and ProfileSaved states
  • Delegate API calls to Profile Service and map results to UI states
  • Debounce rapid setting change events to avoid API flooding

Interfaces

add(ProfileEvent)
onLoadProfile(event, emit)
onSubmitProfileUpdate(event, emit)
onUpdateSetting(event, emit)
onEnterEditMode(event, emit)
onCancelEdit(event, emit)
dispose()

Relationships

Dependencies (1)

Components this component depends on

Dependents (2)

Components that depend on this component