11/17/1
This commit is contained in:
@@ -4,6 +4,7 @@ import 'package:SEFER/constant/colors.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/controller/firebase/firbase_messge.dart';
|
||||
import 'package:SEFER/views/widgets/elevated_btn.dart';
|
||||
import 'package:SEFER/views/widgets/error_snakbar.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
@@ -81,22 +82,10 @@ class CaptainWalletController extends GetxController {
|
||||
amountToNewDriverMap = d['data'];
|
||||
// update();
|
||||
} else {
|
||||
Get.snackbar(
|
||||
"This driver is not registered".tr,
|
||||
'',
|
||||
duration: const Duration(seconds: 3),
|
||||
backgroundColor: AppColor.redColor,
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
);
|
||||
mySnackeBarError("This driver is not registered".tr);
|
||||
}
|
||||
} else {
|
||||
Get.snackbar(
|
||||
'Your Budget less than needed'.tr,
|
||||
'',
|
||||
duration: const Duration(seconds: 3),
|
||||
backgroundColor: AppColor.redColor,
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
);
|
||||
mySnackeBarError('Your Budget less than needed'.tr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/constant/colors.dart';
|
||||
import 'package:SEFER/main.dart';
|
||||
import 'package:SEFER/print.dart';
|
||||
import 'package:SEFER/views/widgets/error_snakbar.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:secure_string_operations/secure_string_operations.dart';
|
||||
@@ -91,14 +92,11 @@ class PaymobPayout extends GetxController {
|
||||
'Wallet',
|
||||
box.read(BoxName.emailDriver).toString());
|
||||
|
||||
Get.snackbar('Transaction successful'.tr,
|
||||
'${'Transaction successful'.tr} ${dec['amount']}',
|
||||
backgroundColor: AppColor.greenColor);
|
||||
mySnackbarSuccess('${'Transaction successful'.tr} ${dec['amount']}');
|
||||
|
||||
Get.find<CaptainWalletController>().refreshCaptainWallet();
|
||||
} else if (dec['disbursement_status'] == 'failed') {
|
||||
Get.snackbar('Transaction failed'.tr, 'Transaction failed'.tr,
|
||||
backgroundColor: AppColor.redColor);
|
||||
mySnackeBarError('Transaction failed'.tr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,14 +173,10 @@ class PaymobPayout extends GetxController {
|
||||
'Wallet',
|
||||
box.read(BoxName.emailDriver).toString());
|
||||
|
||||
Get.snackbar('Transaction successful'.tr,
|
||||
'${'Transaction successful'.tr} ${dec['amount']}',
|
||||
backgroundColor: AppColor.greenColor);
|
||||
|
||||
mySnackbarSuccess('${'Transaction successful'.tr} ${dec['amount']}');
|
||||
Get.find<CaptainWalletController>().refreshCaptainWallet();
|
||||
} else if (dec['disbursement_status'] == 'failed') {
|
||||
Get.snackbar('Transaction failed'.tr, 'Transaction failed'.tr,
|
||||
backgroundColor: AppColor.redColor);
|
||||
mySnackeBarError('Transaction failed'.tr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user