25-10-11/1

This commit is contained in:
Hamza-Ayed
2025-11-06 12:29:17 +03:00
parent 14484fcd8f
commit a69e4c6912
46 changed files with 14145 additions and 13529 deletions

View File

@@ -191,9 +191,6 @@ class CRUD {
'Bearer ${r(box.read(BoxName.jwt)).toString().split(Env.addd)[0]}'
},
);
Log.print('response: ${response.body}');
Log.print('req: ${response.request}');
Log.print('payload: ${payload}');
if (response.statusCode == 200) {
var jsonData = jsonDecode(response.body);

View File

@@ -119,7 +119,7 @@ class AI extends GetxController {
body: 'for '.tr + box.read(BoxName.phoneDriver).toString(),
isTopic: false, // Important: this is a token
tone: 'tone2',
driverList: [],
driverList: [], category: 'You have received a gift token!',
);
} else {
// mySnackeBarError(

View File

@@ -224,15 +224,15 @@ class LocationController extends GetxController {
}
_lastPosForDistance = pos;
// ✅ تحديث الكاميرا
_homeCtrl.mapHomeCaptainController?.animateCamera(
CameraUpdate.newCameraPosition(
CameraPosition(
bearing: Get.find<LocationController>().heading,
target: myLocation,
zoom: 17, // Adjust zoom level as needed
),
),
);
// _homeCtrl.mapHomeCaptainController?.animateCamera(
// CameraUpdate.newCameraPosition(
// CameraPosition(
// bearing: Get.find<LocationController>().heading,
// target: myLocation,
// zoom: 17, // Adjust zoom level as needed
// ),
// ),
// );
update(); // تحديث الواجهة الرسومية بالبيانات الجديدة
await _smartSend(pos, loc);
@@ -354,7 +354,7 @@ class LocationController extends GetxController {
final payload = _buildPayload(pos, status, loc);
try {
await CRUD().post(
link: '${AppLink.server}/ride/location/update.php',
link: '${AppLink.locationServer}/update.php',
payload: payload,
);
_lastSentLoc = pos;
@@ -403,7 +403,7 @@ class LocationController extends GetxController {
try {
print('⏱️ Adding a single point to car_track... $payload');
await CRUD().post(
link: '${AppLink.server}/ride/location/add.php',
link: '${AppLink.locationServer}/add.php',
payload: payload, // ← الآن Map<String,String>
);
} catch (e) {
@@ -438,7 +438,7 @@ class LocationController extends GetxController {
try {
await CRUD().post(
link: '${AppLink.server}/ride/location/update.php',
link: '${AppLink.locationServer}/update.php',
payload: payload,
);
_lastSentAt = DateTime.now();

View File

@@ -36,6 +36,7 @@ Future<void> showDriverGiftClaim(BuildContext context) async {
box.read(BoxName.is_claimed) == null) {
MyDialog().getDialog(
'You have gift 30000 SYP'.tr, 'This for new registration'.tr, () async {
Get.back();
var res = await CRUD().post(link: AppLink.updateDriverClaim, payload: {
'driverId': box.read(BoxName.driverID),
});
@@ -49,7 +50,6 @@ Future<void> showDriverGiftClaim(BuildContext context) async {
);
box.write(BoxName.is_claimed, '1');
}
Get.back();
});
}
}