25-10-11/1
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user