Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df1f487804 | ||
|
|
32a6531613 |
@@ -43,23 +43,27 @@ class NavigationView extends StatelessWidget {
|
|||||||
builder: (_) => Stack(
|
builder: (_) => Stack(
|
||||||
children: [
|
children: [
|
||||||
// ── 1. Map Layer ──────────────────────────────────────────────
|
// ── 1. Map Layer ──────────────────────────────────────────────
|
||||||
IntaleqMap(
|
Listener(
|
||||||
apiKey: Env.mapSaasKey,
|
onPointerDown: (_) => c.onUserPanned(),
|
||||||
onMapCreated: c.onMapCreated,
|
child: IntaleqMap(
|
||||||
onStyleLoaded: c.onStyleLoaded,
|
apiKey: Env.mapSaasKey,
|
||||||
onLongPress: (latlng) => c.onMapLongPressed(Point(0, 0), latlng),
|
onMapCreated: c.onMapCreated,
|
||||||
onTap: (latlng) => c.onMapTapped(Point(0, 0), latlng),
|
onStyleLoaded: c.onStyleLoaded,
|
||||||
markers: c.markers,
|
onLongPress: (latlng) =>
|
||||||
polylines: c.polylines,
|
c.onMapLongPressed(Point(0, 0), latlng),
|
||||||
circles: c.circles,
|
onTap: (latlng) => c.onMapTapped(Point(0, 0), latlng),
|
||||||
polygons: c.polygons,
|
markers: c.markers,
|
||||||
mapType: Get.isDarkMode
|
polylines: c.polylines,
|
||||||
? IntaleqMapType.normal
|
circles: c.circles,
|
||||||
: IntaleqMapType.light,
|
polygons: c.polygons,
|
||||||
initialCameraPosition: CameraPosition(
|
mapType: Get.isDarkMode
|
||||||
target: c.myLocation ?? const LatLng(33.5138, 36.2765),
|
? IntaleqMapType.normal
|
||||||
zoom: 16.0),
|
: IntaleqMapType.light,
|
||||||
myLocationEnabled: false,
|
initialCameraPosition: CameraPosition(
|
||||||
|
target: c.myLocation ?? const LatLng(33.5138, 36.2765),
|
||||||
|
zoom: 16.0),
|
||||||
|
myLocationEnabled: false,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
// ── 2. Top UI (Explore Mode) ──────────────────────────────────
|
// ── 2. Top UI (Explore Mode) ──────────────────────────────────
|
||||||
@@ -89,10 +93,10 @@ class NavigationView extends StatelessWidget {
|
|||||||
_LocationPickerOverlay(controller: c),
|
_LocationPickerOverlay(controller: c),
|
||||||
|
|
||||||
// ── 10. Recenter Button ───────────────────────────────────────
|
// ── 10. Recenter Button ───────────────────────────────────────
|
||||||
if (!c.isCameraLocked && !c.isNavigating)
|
if (!c.isCameraLocked)
|
||||||
Positioned(
|
Positioned(
|
||||||
right: 16,
|
right: 16,
|
||||||
bottom: 250,
|
bottom: c.isNavigating ? 150 : 250,
|
||||||
child: _buildMapFAB(
|
child: _buildMapFAB(
|
||||||
icon: Icons.my_location_rounded,
|
icon: Icons.my_location_rounded,
|
||||||
onTap: () => c.relockCameraToUser(),
|
onTap: () => c.relockCameraToUser(),
|
||||||
@@ -271,7 +275,8 @@ void _showMenuSheet(BuildContext context) {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width: 40, height: 4,
|
width: 40,
|
||||||
|
height: 4,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.grey.withOpacity(0.3),
|
color: Colors.grey.withOpacity(0.3),
|
||||||
borderRadius: BorderRadius.circular(2),
|
borderRadius: BorderRadius.circular(2),
|
||||||
@@ -281,27 +286,42 @@ void _showMenuSheet(BuildContext context) {
|
|||||||
_MenuTile(
|
_MenuTile(
|
||||||
icon: Icons.settings_rounded,
|
icon: Icons.settings_rounded,
|
||||||
label: isAr ? 'الإعدادات' : 'Settings',
|
label: isAr ? 'الإعدادات' : 'Settings',
|
||||||
onTap: () { Get.back(); Get.to(() => const SettingPage()); },
|
onTap: () {
|
||||||
|
Get.back();
|
||||||
|
Get.to(() => const SettingPage());
|
||||||
|
},
|
||||||
),
|
),
|
||||||
_MenuTile(
|
_MenuTile(
|
||||||
icon: Icons.account_balance_wallet_rounded,
|
icon: Icons.account_balance_wallet_rounded,
|
||||||
label: isAr ? 'المحفظة' : 'Wallet',
|
label: isAr ? 'المحفظة' : 'Wallet',
|
||||||
onTap: () { Get.back(); Get.toNamed('/wallet'); },
|
onTap: () {
|
||||||
|
Get.back();
|
||||||
|
Get.toNamed('/wallet');
|
||||||
|
},
|
||||||
),
|
),
|
||||||
_MenuTile(
|
_MenuTile(
|
||||||
icon: Icons.history_rounded,
|
icon: Icons.history_rounded,
|
||||||
label: isAr ? 'سجل الرحلات' : 'Trip History',
|
label: isAr ? 'سجل الرحلات' : 'Trip History',
|
||||||
onTap: () { Get.back(); Get.to(() => const OrderHistory()); },
|
onTap: () {
|
||||||
|
Get.back();
|
||||||
|
Get.to(() => const OrderHistory());
|
||||||
|
},
|
||||||
),
|
),
|
||||||
_MenuTile(
|
_MenuTile(
|
||||||
icon: Icons.headset_mic_rounded,
|
icon: Icons.headset_mic_rounded,
|
||||||
label: isAr ? 'اتصل بنا' : 'Contact Us',
|
label: isAr ? 'اتصل بنا' : 'Contact Us',
|
||||||
onTap: () { Get.back(); Get.toNamed('/contactSupport'); },
|
onTap: () {
|
||||||
|
Get.back();
|
||||||
|
Get.toNamed('/contactSupport');
|
||||||
|
},
|
||||||
),
|
),
|
||||||
_MenuTile(
|
_MenuTile(
|
||||||
icon: Icons.info_outline_rounded,
|
icon: Icons.info_outline_rounded,
|
||||||
label: isAr ? 'حول التطبيق' : 'About',
|
label: isAr ? 'حول التطبيق' : 'About',
|
||||||
onTap: () { Get.back(); Get.to(() => const AboutPage()); },
|
onTap: () {
|
||||||
|
Get.back();
|
||||||
|
Get.to(() => const AboutPage());
|
||||||
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
],
|
],
|
||||||
@@ -314,13 +334,15 @@ class _MenuTile extends StatelessWidget {
|
|||||||
final IconData icon;
|
final IconData icon;
|
||||||
final String label;
|
final String label;
|
||||||
final VoidCallback onTap;
|
final VoidCallback onTap;
|
||||||
const _MenuTile({required this.icon, required this.label, required this.onTap});
|
const _MenuTile(
|
||||||
|
{required this.icon, required this.label, required this.onTap});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
leading: Icon(icon, color: _kPrimary, size: 24),
|
leading: Icon(icon, color: _kPrimary, size: 24),
|
||||||
title: Text(label, style: TextStyle(fontWeight: FontWeight.w600, color: _kOnSurface)),
|
title: Text(label,
|
||||||
|
style: TextStyle(fontWeight: FontWeight.w600, color: _kOnSurface)),
|
||||||
trailing: const Icon(Icons.chevron_right_rounded, color: Colors.grey),
|
trailing: const Icon(Icons.chevron_right_rounded, color: Colors.grey),
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user