Commit 28446cca authored by Izol's avatar Izol

update version SS.21.WWW (NON SERVER BINDING)

parent f7b14f68
sdk.dir=/Users/macbookpro/Library/Android/sdk sdk.dir=/Users/macbookpro/Library/Android/sdk
flutter.sdk=/Users/macbookpro/Developer/flutter flutter.sdk=/Users/macbookpro/Developer/flutter
flutter.buildMode=debug flutter.buildMode=debug
flutter.versionName=SS.20.WWW flutter.versionName=SS.21.WWW
flutter.versionCode=13 flutter.versionCode=14
\ No newline at end of file \ No newline at end of file
...@@ -680,9 +680,9 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback { ...@@ -680,9 +680,9 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
animType: AnimType.rightSlide, animType: AnimType.rightSlide,
headerAnimationLoop: true, headerAnimationLoop: true,
title: title:
'Wristband tidak sama ! tempelkan wristband sebelumnya', 'Wristband tidak sama ! tempelkan wristband sebelumnya\nLepaskan dan tetap simpan Gelang/Wristband anda di reader ${countMax}',
desc: desc:
"Wristband are not the same! please put the previous wristband ${countMax}", "Wristband are not the same! please put the previous wristband\nTake it off and keep your Bracelet/Wristband on the reader ${countMax}",
btnOkOnPress: () async { btnOkOnPress: () async {
if (timer != null) timer?.cancel(); if (timer != null) timer?.cancel();
if (countMax < int.parse(nilaiTap)) { if (countMax < int.parse(nilaiTap)) {
...@@ -2075,16 +2075,16 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback { ...@@ -2075,16 +2075,16 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
//button batalkan di showqris //button batalkan di showqris
TextButton( TextButton(
onPressed: () async { onPressed: () async {
if (isProcessCheck) return;
setState(() => isProcessCheck = true); setState(() => isProcessCheck = true);
try { try {
bool value = await _cekStatus(); bool result = await _cekStatus();
setState((){
if (value) { if (result) {
print("pembayaran berhasil dilakukan"); print("pembayaran berhasil dilakukan");
showPop(approvalCode); showPop(approvalCode);
} else { } else {
await AwesomeDialog( AwesomeDialog(
context: context, context: context,
dismissOnTouchOutside: false, dismissOnTouchOutside: false,
dialogType: DialogType.warning, dialogType: DialogType.warning,
...@@ -2095,6 +2095,7 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback { ...@@ -2095,6 +2095,7 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
desc: "You have canceled the transaction", desc: "You have canceled the transaction",
).show().then((value) { ).show().then((value) {
Navigator.of(context).pop(); Navigator.of(context).pop();
setState(() => isProcessCheck = false);
timer?.cancel(); timer?.cancel();
dataQris = null; dataQris = null;
checkCountZero = false; checkCountZero = false;
...@@ -2103,10 +2104,11 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback { ...@@ -2103,10 +2104,11 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
tapDial(); tapDial();
}); });
} }
});
} catch (e) { } catch (e) {
// Handle any errors that occur during _cekStatus() print("Error: $e");
} finally {
setState(() => isProcessCheck = false); setState(() => isProcessCheck = false);
// Handle any errors that occur during _cekStatus()
} }
}, },
child: (isProcessCheck) child: (isProcessCheck)
...@@ -2170,8 +2172,6 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback { ...@@ -2170,8 +2172,6 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
Navigator.pop(context); Navigator.pop(context);
showPop(approvalCode); showPop(approvalCode);
} else { } else {
// isProcessCheck = false; // Hapus baris ini
setState(() => isProcessCheck = false); // Pindahkan baris ini ke bawah AwesomeDialog
AwesomeDialog( AwesomeDialog(
context: context, context: context,
dialogType: DialogType.error, dialogType: DialogType.error,
...@@ -2182,7 +2182,9 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback { ...@@ -2182,7 +2182,9 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
btnOkOnPress: () {}, btnOkOnPress: () {},
btnOkIcon: Icons.cancel, btnOkIcon: Icons.cancel,
btnOkColor: Colors.red, btnOkColor: Colors.red,
).show(); ).show().then((value) {
setState(() => isProcessCheck = false);
});
} }
}); });
} catch (e) { } catch (e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment