Update: 2026-06-27 05:36:53
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user