Commit 9456f537 authored by Izol's avatar Izol

added auto confrim in phone validation

- try to handle after topup timer
parent 81906085
...@@ -511,7 +511,8 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback { ...@@ -511,7 +511,8 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
context: context, context: context,
dialogType: DialogType.success, dialogType: DialogType.success,
animType: AnimType.rightSlide, animType: AnimType.rightSlide,
autoHide: Duration(seconds: 5), dismissOnTouchOutside: false,
// autoHide: Duration(seconds: int.parse(idle)),
headerAnimationLoop: true, headerAnimationLoop: true,
title: 'Isi Ulang Anda Berhasil, Saldo Anda Saat Ini $balance', title: 'Isi Ulang Anda Berhasil, Saldo Anda Saat Ini $balance',
titleTextStyle: blackTextStyle.copyWith( titleTextStyle: blackTextStyle.copyWith(
...@@ -523,8 +524,11 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback { ...@@ -523,8 +524,11 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
fontSize: 18, fontSize: 18,
fontWeight: medium, fontWeight: medium,
), ),
).show(); ).show();
// isShowingDialog = true;
infoM = await StartService.print( infoM = await StartService.print(
info, info,
companyName.split("-")[0], companyName.split("-")[0],
...@@ -1232,45 +1236,52 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback { ...@@ -1232,45 +1236,52 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
tapIdle(); tapIdle();
num = pin; num = pin;
}); });
// print("Completed: $pin"); if (timer != null) timer?.cancel();
// print("Completed: $subPhone"); tapIdle();
// String outletName = print("Completed: $num");
// PreferencesHelper.getString('outlet_name'); print("Completed: $subPhone");
// if (subPhone == pin) { String outletName =
// AwesomeDialog( PreferencesHelper.getString('outlet_name');
// context: context, if (subPhone == num) {
// dialogType: DialogType.success, AwesomeDialog(
// animType: AnimType.rightSlide, context: context,
// headerAnimationLoop: true, dialogType: DialogType.success,
// title: 'Berhasil verifikasi', dismissOnTouchOutside: false,
// desc: "verification success", animType: AnimType.rightSlide,
// btnOkOnPress: () { headerAnimationLoop: true,
// if (mounted) { title: 'Berhasil verifikasi',
// Navigator.of(context, desc: "verification success",
// rootNavigator: true) btnOkOnPress: () {
// .pop(); if (timer != null) timer?.cancel();
// denom(outletName, info); tapIdle();
if (mounted) {
num = "";
Navigator.of(context,
rootNavigator: true)
.pop();
// } denom(outletName, info);
// }, }
// btnOkIcon: Icons.check, },
// btnOkColor: Colors.green) btnOkIcon: Icons.check,
// .show(); btnOkColor: Colors.green)
// } else { .show();
// AwesomeDialog( } else {
// context: context, AwesomeDialog(
// dialogType: DialogType.error, context: context,
// animType: AnimType.rightSlide, dialogType: DialogType.error,
// headerAnimationLoop: true, animType: AnimType.rightSlide,
// title: headerAnimationLoop: true,
// 'Pastikan nomor Anda sesuai !', title: 'Pastikan nomor Anda sesuai !',
// desc: desc: "Make sure your number matches !",
// "Make sure your number matches !", btnOkOnPress: () {
// btnOkOnPress: () {}, if (timer != null) timer?.cancel();
// btnOkIcon: Icons.cancel, tapIdle();
// btnOkColor: Colors.red) },
// .show(); btnOkIcon: Icons.cancel,
// } btnOkColor: Colors.red)
.show();
}
}, },
), ),
), ),
......
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