Update: 2026-06-21 02:07:00
This commit is contained in:
@@ -10,6 +10,11 @@ import '../../../constant/box_name.dart';
|
||||
import '../../../constant/colors.dart';
|
||||
import '../../../main.dart';
|
||||
import '../../widgets/error_snakbar.dart';
|
||||
import '../../../views/home/setting_page.dart';
|
||||
import '../../../views/home/HomePage/about_page.dart';
|
||||
import '../../../views/home/HomePage/contact_us.dart';
|
||||
import '../../../views/home/HomePage/share_app_page.dart';
|
||||
import '../../../views/home/profile/order_history.dart';
|
||||
import 'navigation_controller.dart';
|
||||
|
||||
// ─── Color Palette ──────────────────────────────────────────────────────────
|
||||
@@ -42,8 +47,8 @@ class NavigationView extends StatelessWidget {
|
||||
apiKey: Env.mapSaasKey,
|
||||
onMapCreated: c.onMapCreated,
|
||||
onStyleLoaded: c.onStyleLoaded,
|
||||
onLongPress: (pos) => c.onMapLongPressed(Point(0, 0), pos),
|
||||
onTap: (pos) => c.onMapTapped(Point(0, 0), pos),
|
||||
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,
|
||||
@@ -203,7 +208,7 @@ class _ExploreTopUI extends StatelessWidget {
|
||||
children: [
|
||||
IconButton(
|
||||
icon: Icon(Icons.menu_rounded, color: _kOnSurface, size: 24),
|
||||
onPressed: () {},
|
||||
onPressed: () => _showMenuSheet(context),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
@@ -252,6 +257,76 @@ class _ExploreTopUI extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
void _showMenuSheet(BuildContext context) {
|
||||
final isAr = box.read(BoxName.lang) == 'ar';
|
||||
|
||||
Get.bottomSheet(
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: _kCardColor,
|
||||
borderRadius: const BorderRadius.vertical(top: Radius.circular(24)),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(vertical: 20),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Container(
|
||||
width: 40, height: 4,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey.withOpacity(0.3),
|
||||
borderRadius: BorderRadius.circular(2),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
_MenuTile(
|
||||
icon: Icons.settings_rounded,
|
||||
label: isAr ? 'الإعدادات' : 'Settings',
|
||||
onTap: () { Get.back(); Get.to(() => const SettingPage()); },
|
||||
),
|
||||
_MenuTile(
|
||||
icon: Icons.account_balance_wallet_rounded,
|
||||
label: isAr ? 'المحفظة' : 'Wallet',
|
||||
onTap: () { Get.back(); Get.toNamed('/wallet'); },
|
||||
),
|
||||
_MenuTile(
|
||||
icon: Icons.history_rounded,
|
||||
label: isAr ? 'سجل الرحلات' : 'Trip History',
|
||||
onTap: () { Get.back(); Get.to(() => const OrderHistory()); },
|
||||
),
|
||||
_MenuTile(
|
||||
icon: Icons.headset_mic_rounded,
|
||||
label: isAr ? 'اتصل بنا' : 'Contact Us',
|
||||
onTap: () { Get.back(); Get.toNamed('/contactSupport'); },
|
||||
),
|
||||
_MenuTile(
|
||||
icon: Icons.info_outline_rounded,
|
||||
label: isAr ? 'حول التطبيق' : 'About',
|
||||
onTap: () { Get.back(); Get.to(() => const AboutPage()); },
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
class _MenuTile extends StatelessWidget {
|
||||
final IconData icon;
|
||||
final String label;
|
||||
final VoidCallback 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)),
|
||||
trailing: const Icon(Icons.chevron_right_rounded, color: Colors.grey),
|
||||
onTap: onTap,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _ExploreBottomPanel extends StatelessWidget {
|
||||
final NavigationController controller;
|
||||
const _ExploreBottomPanel({required this.controller});
|
||||
@@ -743,7 +818,10 @@ class _ExploreActionRow extends StatelessWidget {
|
||||
_ActionCapsule(
|
||||
icon: Icons.bookmark_rounded,
|
||||
label: isAr ? 'المحفوظات' : 'Saved',
|
||||
onTap: () {},
|
||||
onTap: () {
|
||||
HapticFeedback.lightImpact();
|
||||
mySnackbarInfo(isAr ? 'قريباً...' : 'Coming soon...');
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user