feat: implement splash and onboarding flows, update app assets, and add project design documentation
This commit is contained in:
@@ -82,15 +82,22 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
);
|
||||
final loc = LatLng(pos.latitude, pos.longitude);
|
||||
|
||||
// جلب العنوان العكسي للموقع الحالي.
|
||||
final place = await _mapsRepo.reverseGeocode(pos.latitude, pos.longitude);
|
||||
|
||||
// نوسّط الكاميرا على الموقع فوراً — لا ننتظر العنوان العكسي.
|
||||
emit(state.copyWith(
|
||||
loading: false,
|
||||
currentLocation: loc,
|
||||
cameraTarget: loc,
|
||||
pickup: place,
|
||||
));
|
||||
|
||||
// العنوان العكسي تحسين إضافي: فشله يجب ألّا يمنع توسيط الخريطة.
|
||||
try {
|
||||
final place = await _mapsRepo.reverseGeocode(pos.latitude, pos.longitude);
|
||||
emit(state.copyWith(pickup: place));
|
||||
} catch (_) {
|
||||
emit(state.copyWith(
|
||||
pickup: PlaceModel(name: '', lat: loc.latitude, lng: loc.longitude),
|
||||
));
|
||||
}
|
||||
} catch (e) {
|
||||
emit(state.copyWith(
|
||||
loading: false,
|
||||
|
||||
Reference in New Issue
Block a user