Update: 2026-06-27 05:36:53

This commit is contained in:
Hamza-Ayed
2026-06-27 05:36:53 +03:00
parent 7497bdcfae
commit bf1416b2a7
7 changed files with 109 additions and 40 deletions

View File

@@ -554,6 +554,15 @@ class ScanDocumentsByApi extends GetxController {
}
}
if (responseString.isNotEmpty) {
try {
final decoded = jsonDecode(responseString);
if (decoded['status'] == 'success' && decoded['message']['file_link'] != null) {
box.write(BoxName.driverPhotoUrl, decoded['message']['file_link'].toString());
}
} catch (_) {}
}
isLoading = false;
update();

View File

@@ -35,15 +35,17 @@ Future<void> getPermissionOverlay() async {
Future<void> showDriverGiftClaim(BuildContext context) async {
if (box.read(BoxName.is_claimed).toString() == '0' ||
box.read(BoxName.is_claimed) == null) {
final country = box.read(BoxName.countryCode)?.toString() ?? 'Jordan';
final giftAmount = country == 'Jordan' ? '3' : '300';
MyDialog().getDialog(
'You have gift 300 ${CurrencyHelper.currency}'.tr, 'This for new registration'.tr, () async {
'You have gift $giftAmount ${CurrencyHelper.currency}'.tr, 'This for new registration'.tr, () async {
Get.back();
var res = await CRUD().post(link: AppLink.updateDriverClaim, payload: {
'driverId': box.read(BoxName.driverID),
});
if (res != 'failure') {
Get.find<CaptainWalletController>()
.addDriverWallet('new driver', '300', '300');
.addDriverWallet('new driver', giftAmount, giftAmount);
Confetti.launch(
context,
options: