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