5/6/1
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -8,6 +11,7 @@ import 'package:SEFER/views/home/profile/feed_back_page.dart';
|
||||
import 'package:SEFER/views/home/profile/order_history.dart';
|
||||
import 'package:SEFER/views/home/profile/promos_passenger_page.dart';
|
||||
import 'package:SEFER/views/home/profile/taarif_page.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../../../constant/colors.dart';
|
||||
import '../../../controller/home/map_passenger_controller.dart';
|
||||
@@ -160,9 +164,24 @@ class MapMenuWidget extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
IconMainPageMap(
|
||||
onTap: () {
|
||||
// Get.to(const RegisterCaptin());
|
||||
//todo use url to use driver app
|
||||
onTap: () async {
|
||||
final String driverAppUrl;
|
||||
if (defaultTargetPlatform == TargetPlatform.android) {
|
||||
driverAppUrl =
|
||||
'https://play.google.com/store/apps/details?id=id6458734951'; // Replace with your driver app's Play Store URL
|
||||
} else if (defaultTargetPlatform == TargetPlatform.iOS) {
|
||||
driverAppUrl =
|
||||
'https://apps.apple.com/app/id6458734951'; // Replace with your driver app's App Store ID
|
||||
} else {
|
||||
// Handle other platforms or unknown platform (optional)
|
||||
return;
|
||||
}
|
||||
|
||||
if (await canLaunch(driverAppUrl)) {
|
||||
await launch(driverAppUrl);
|
||||
} else {
|
||||
throw 'Could not launch app store URL';
|
||||
}
|
||||
},
|
||||
title: 'Driver'.tr,
|
||||
icon: WeatherIcons.wi_moon_14,
|
||||
|
||||
Reference in New Issue
Block a user