feat(consultants): fixed infinite loading after verifying phone

This commit is contained in:
misha
2026-01-28 12:56:04 +03:00
parent cf3d1a945c
commit 3dc36ab52d

View File

@@ -83,8 +83,12 @@ class RegisterConsultantCubit extends Cubit<RegisterConsultantState> {
}
Future<List<ConsultantCertPhotoModel>> _fetchVisibleCertPhotos() async {
final photos = await consultantRepository.getConsultantCertPhotos();
return _onlyVisible(photos);
try {
final photos = await consultantRepository.getConsultantCertPhotos();
return _onlyVisible(photos);
} catch (e) {
return [];
}
}
List<ConsultantCertPhotoModel> _onlyVisible(List<ConsultantCertPhotoModel> photos) {