feat: Add post-save navigation to staff profile for emergency contact and experience, remove a placeholder page, and refine bloc usage and UI rendering.

This commit is contained in:
Achintha Isuru
2026-02-22 03:01:44 -05:00
parent 214e0d1237
commit a9ead783e4
8 changed files with 149 additions and 126 deletions

View File

@@ -40,13 +40,13 @@ class HomeCubit extends Cubit<HomeState> with BlocErrorHandler<HomeState> {
);
},
onError: (String errorKey) {
if (isClosed) return state; // Avoid state emission if closed, though emit handles it gracefully usually
if (isClosed)
return state; // Avoid state emission if closed, though emit handles it gracefully usually
return state.copyWith(status: HomeStatus.error, errorMessage: errorKey);
},
);
}
void toggleAutoMatch(bool enabled) {
emit(state.copyWith(autoMatchEnabled: enabled));
}

View File

@@ -63,9 +63,6 @@ class WorkerHomePage extends StatelessWidget {
child: Column(
children: [
BlocBuilder<HomeCubit, HomeState>(
buildWhen: (previous, current) =>
previous.isProfileComplete !=
current.isProfileComplete,
builder: (context, state) {
if (state.isProfileComplete) return const SizedBox();
return PlaceholderBanner(