Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
Dolan SelfService Topup
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Faizol
Dolan SelfService Topup
Commits
8d34c68a
Commit
8d34c68a
authored
Aug 09, 2023
by
Izol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjust print , adjust validation topup gagal , error topup balance
parent
bbf42789
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
294 additions
and
279 deletions
+294
-279
MainActivity.kt
...rc/main/kotlin/com/example/self_service_3/MainActivity.kt
+2
-47
home_page.dart
lib/ui/pages/home_page.dart
+292
-232
No files found.
android/app/src/main/kotlin/com/example/self_service_3/MainActivity.kt
View file @
8d34c68a
...
...
@@ -301,51 +301,6 @@ class MainActivity : MethodChannel.MethodCallHandler, FlutterActivity(), MifareT
)
print
(
"model ${Build.MODEL}"
)
// if (Build.MODEL == "T2s" || Build.MODEL == "T2Mini" || Build.MODEL == "T2mini") {
if
(
Build
.
MODEL
==
"T2s"
||
Build
.
MODEL
==
"T2Mini"
)
{
var
text
=
"""
[C]${companyName}
[C]${companyAddress}
[C]${companyPhone}
[C]--------------------------------
[L]xTanggal : ${sdf.format(timeNow)}
[L]xNo Transaksi : ${approvalCode}
[L] No Kartu : ${ticket.cardNumber.toString()}
[L]Masa Berlaku : ${sdf.format(cardExpiry)}"""
if
(
status
==
"Berhasil"
){
text
+=
"""
[L]Saldo Awal : Rp${formatDecimalToPrice(prevBalance.toDouble()).toString()}
[L]Isi Saldo : Rp${formatDecimalToPrice(denom.toDouble()).toString()}
[L]Saldo Akhir : Rp${formatDecimalToPrice(ticket.balance!!.toDouble()).toString()}
[L]Biaya Layanan : Rp${formatDecimalToPrice(serviceCharge.toDouble()).toString()}
[L]Jumlah Bayar : Rp${formatDecimalToPrice(serviceChargeAmount.toDouble()).toString()}
[L]Metode Bayar : ${metodeBayar}
[L]Status : ${status}
[C]--------------------------------
[C]Top Up Berhasil
[C]powered by dolanapp.com
"""
}
else
{
text
+=
"""
[L]Saldo : Rp${formatDecimalToPrice(prevBalance.toDouble()).toString()}
[L]Biaya Layanan : Rp${formatDecimalToPrice(serviceCharge.toDouble()).toString()}
[L]Jumlah Bayar : Rp${formatDecimalToPrice(serviceChargeAmount.toDouble()).toString()}
[L]Metode Bayar : ${metodeBayar}
[L]Status : ${status}
[C]--------------------------------
[C]Top Up Gagal
[C]powered by dolanapp.com
"""
}
text
=
text
.
trimIndent
()
_mifareTicketing
?.
generateReceiptTopup
(
null
,
text
,
bitmapIcon
,
paperWidth
=
57F
,
isBluetooth
=
true
)
}
else
{
var
receiptLayout
=
ReceiptBuilder
(
570
)
.
setMarginTop
(
30
)
.
setMarginLeft
(
30
)
...
...
@@ -389,7 +344,7 @@ class MainActivity : MethodChannel.MethodCallHandler, FlutterActivity(), MifareT
.
addBlankSpace
(
10
)
.
addText
(
"Masa Berlaku...............: "
+
sdf
.
format
(
cardExpiry
))
.
addBlankSpace
(
10
)
if
(
status
==
"Berhasil"
){
if
(
status
==
"
Isi Saldo
Berhasil"
){
receiptLayout
.
addText
(
"Saldo Awal...................: Rp"
+
formatDecimalToPrice
(
prevBalance
.
toDouble
()).
toString
())
.
addBlankSpace
(
10
)
.
addText
(
"Isi Saldo.........................: Rp"
+
formatDecimalToPrice
(
denom
.
toDouble
()))
...
...
@@ -438,7 +393,7 @@ class MainActivity : MethodChannel.MethodCallHandler, FlutterActivity(), MifareT
}
val
finalReceiptLayout
:
ReceiptBuilder
=
receiptLayout
_mifareTicketing
?.
generateReceiptTopup
(
finalReceiptLayout
,
""
,
null
,
paperWidth
=
570F
,
isBluetooth
=
false
)
}
}
}
lib/ui/pages/home_page.dart
View file @
8d34c68a
...
...
@@ -494,6 +494,17 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
print
(
"lastBalance
$lastBalance
"
);
print
(
"prevBalance
$prevBalance
"
);
String
ticketJson
,
companyName
,
companyPhone
,
denom
;
companyName
=
PreferencesHelper
.
getString
(
'outletname'
);
companyPhone
=
PreferencesHelper
.
getString
(
'companyphone'
);
companyAddress
=
PreferencesHelper
.
getString
(
'multioutletaddress'
);
denom
=
amountController
!.
text
.
replaceAll
(
","
,
""
);
String
sca
=
PreferencesHelper
.
getString
(
"multioutletservicechargeamount"
);
String
sc
=
PreferencesHelper
.
getString
(
"multioutletservicecharge"
);
// String metodeBayar = PreferencesHelper.getString("provider");
// String status = "Berhasil";
if
(
int
.
parse
(
lastBalance
)
>
int
.
parse
(
prevBalance
!))
{
countMax
=
0
;
var
result
=
await
StartService
.
topUpConfirm
(
...
...
@@ -562,16 +573,6 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
DatabaseHelper
.
insertTransaction
(
wristbandInfo
);
print
(
"ini pesan tersimpan berhasil ke database
$wristbandInfo
"
);
String
ticketJson
,
companyName
,
companyPhone
,
denom
;
companyName
=
PreferencesHelper
.
getString
(
'outletname'
);
companyPhone
=
PreferencesHelper
.
getString
(
'companyphone'
);
companyAddress
=
PreferencesHelper
.
getString
(
'multioutletaddress'
);
denom
=
amountController
!.
text
.
replaceAll
(
","
,
""
);
String
sca
=
PreferencesHelper
.
getString
(
"multioutletservicechargeamount"
);
String
sc
=
PreferencesHelper
.
getString
(
"multioutletservicecharge"
);
String
metodeBayar
=
PreferencesHelper
.
getString
(
"provider"
);
String
status
=
"Berhasil"
;
_getInfoBalance
(
info
);
...
...
@@ -616,14 +617,48 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
sca
!
+
sc
!,
(
int
.
parse
(
amount
)
+
int
.
parse
(
sca
)
+
int
.
parse
(
sc
)).
toString
(),
denom
.
replaceAll
(
","
,
""
),
metodeBayar
,
status
,
PreferencesHelper
.
getString
(
"provider"
)
,
"Isi Saldo Berhasil"
,
);
isHitApi
=
false
;
}
else
{
}
else
{
print
(
'topup gagal'
);
AwesomeDialog
(
context:
context
,
autoHide:
Duration
(
seconds:
10
),
dialogType:
DialogType
.
error
,
animType:
AnimType
.
rightSlide
,
headerAnimationLoop:
true
,
title:
"Transaksi isi ulang anda tidak berhasil
\n
simpan bukti pembayaran untuk di tunjukkan kepada petugas"
,
titleTextStyle:
blackTextStyle
.
copyWith
(
fontSize:
20
,
fontWeight:
bold
,
),
desc:
"Your top up transaction was not successful
\n
Save proof of payment to show to the officer"
,
descTextStyle:
greyTextStyle
.
copyWith
(
fontSize:
18
,
fontWeight:
light
,
),
).
show
().
then
((
value
)
{
});
isShowingDialog
=
true
;
dataQris
==
null
;
StartService
.
print
(
prevInfoCard
,
companyName
.
split
(
"-"
)[
0
],
companyAddress
,
companyPhone
,
approvalCode
,
lastBalance
!,
sca
!
+
sc
!,
(
int
.
parse
(
amount
)
+
int
.
parse
(
sca
)
+
int
.
parse
(
sc
))
.
toString
(),
denom
.
replaceAll
(
","
,
""
),
PreferencesHelper
.
getString
(
"provider"
),
"isi saldo tidak berhasil"
,
);
}
return
""
;
}
...
...
@@ -700,87 +735,81 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
tapBalance
();
}
else
{
AwesomeDialog
(
context:
context
,
dismissOnTouchOutside:
false
,
dialogType:
DialogType
.
error
,
animType:
AnimType
.
rightSlide
,
headerAnimationLoop:
true
,
title:
'Transaksi anda gagal ! dikarenakan tidak menempelkan wristband sebelumnya'
,
desc:
"Your transaction failed ! because didn't attach the previous card!"
,
btnOkOnPress:
()
{
String
companyName
,
companyPhone
,
metodeBayar
;
companyName
=
PreferencesHelper
.
getString
(
'outletname'
);
companyName
=
PreferencesHelper
.
getString
(
'outletname'
);
companyPhone
=
PreferencesHelper
.
getString
(
'companyphone'
);
companyAddress
=
PreferencesHelper
.
getString
(
'multioutletaddress'
);
lastBalance
=
infoMap
[
'balance'
].
toString
();
metodeBayar
=
"link-aja"
;
String
sca
=
PreferencesHelper
.
getString
(
"multioutletservicechargeamount"
);
String
sc
=
PreferencesHelper
.
getString
(
"multioutletservicecharge"
);
_getInfoBalance
(
info
);
AwesomeDialog
(
context:
context
,
dismissOnTouchOutside:
false
,
autoHide:
Duration
(
seconds:
10
),
dialogType:
DialogType
.
error
,
animType:
AnimType
.
rightSlide
,
headerAnimationLoop:
true
,
title:
'Transaksi isi ulang anda tidak berhasil
\n
simpan bukti pembayaran untuk di tunjukkan kepada petugas'
,
titleTextStyle:
blackTextStyle
.
copyWith
(
fontSize:
20
,
fontWeight:
bold
,
),
desc:
"Your top up transaction was not successful
\n
Save proof of payment to show to the officer"
,
descTextStyle:
greyTextStyle
.
copyWith
(
fontSize:
18
,
fontWeight:
light
,
),
).
show
().
then
((
value
)
{
Navigator
.
of
(
context
).
pop
();
countMax
=
0
;
setState
(()
=>
isProcessCheck
=
false
);
checkCountZero
=
false
;
timer
?.
cancel
();
isShowingDialog
=
true
;
trxId
=
""
;
reffNo
=
""
;
_showTap
();
tapDial
();
});
StartService
.
print
(
prevInfoCard
,
companyName
.
split
(
"-"
)[
0
],
companyAddress
,
companyPhone
,
approvalCode
,
lastBalance
!,
sca
!
+
sc
!,
(
int
.
parse
(
amount
)
+
int
.
parse
(
sca
)
+
int
.
parse
(
sc
))
.
toString
(),
'0'
,
PreferencesHelper
.
getString
(
"provider"
),
'Gagal'
,
);
// Navigator.pop(context);
},
btnOkIcon:
Icons
.
cancel
,
btnOkColor:
Colors
.
red
)
.
show
();
context:
context
,
dismissOnTouchOutside:
false
,
autoHide:
Duration
(
seconds:
5
),
dialogType:
DialogType
.
error
,
animType:
AnimType
.
rightSlide
,
headerAnimationLoop:
true
,
title:
'Transaksi anda gagal ! dikarenakan tidak menempelkan wristband sebelumnya'
,
desc:
"Your transaction failed ! because didn't attach the previous card!"
,
).
show
().
then
((
value
)
{
String
companyName
,
companyPhone
,
metodeBayar
;
companyName
=
PreferencesHelper
.
getString
(
'outletname'
);
companyName
=
PreferencesHelper
.
getString
(
'outletname'
);
companyPhone
=
PreferencesHelper
.
getString
(
'companyphone'
);
companyAddress
=
PreferencesHelper
.
getString
(
'multioutletaddress'
);
lastBalance
=
infoMap
[
'balance'
].
toString
();
metodeBayar
=
"link-aja"
;
String
sca
=
PreferencesHelper
.
getString
(
"multioutletservicechargeamount"
);
String
sc
=
PreferencesHelper
.
getString
(
"multioutletservicecharge"
);
_getInfoBalance
(
info
);
AwesomeDialog
(
context:
context
,
dismissOnTouchOutside:
false
,
autoHide:
Duration
(
seconds:
10
),
dialogType:
DialogType
.
error
,
animType:
AnimType
.
rightSlide
,
headerAnimationLoop:
true
,
title:
'Transaksi isi ulang anda tidak berhasil
\n
simpan bukti pembayaran untuk di tunjukkan kepada petugas'
,
titleTextStyle:
blackTextStyle
.
copyWith
(
fontSize:
20
,
fontWeight:
bold
,
),
desc:
"Your top up transaction was not successful
\n
Save proof of payment to show to the officer"
,
descTextStyle:
greyTextStyle
.
copyWith
(
fontSize:
18
,
fontWeight:
light
,
),
).
show
().
then
((
value
)
{
Navigator
.
of
(
context
).
pop
();
countMax
=
0
;
setState
(()
=>
isProcessCheck
=
false
);
checkCountZero
=
false
;
timer
?.
cancel
();
isShowingDialog
=
true
;
trxId
=
""
;
reffNo
=
""
;
_showTap
();
tapDial
();
});
StartService
.
print
(
prevInfoCard
,
companyName
.
split
(
"-"
)[
0
],
companyAddress
,
companyPhone
,
approvalCode
,
lastBalance
!,
sca
!
+
sc
!,
(
int
.
parse
(
amount
)
+
int
.
parse
(
sca
)
+
int
.
parse
(
sc
))
.
toString
(),
'0'
,
PreferencesHelper
.
getString
(
"provider"
),
'Gagal Wristband Berbeda'
,
);
// Navigator.pop(context);
});
}
},
btnOkIcon:
Icons
.
cancel
,
...
...
@@ -1156,7 +1185,8 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
},
btnOkColor:
Colors
.
blue
,
).
show
();
}
else
if
(
isTap
==
"Error Get Card Type"
)
{
}
else
if
(
isTap
==
"Error Get Card Type"
)
{
print
(
"Error Get Card Type"
);
await
StartService
.
initLibrary
();
AwesomeDialog
(
...
...
@@ -1181,7 +1211,8 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
},
btnOkColor:
Colors
.
blue
,
).
show
();
}
else
if
(
isTap
==
"CardInfoError: 5001"
)
{
}
else
if
(
isTap
==
"CardInfoError: 5001"
)
{
print
(
"CardInfoError: 5001"
);
await
StartService
.
initLibrary
();
AwesomeDialog
(
...
...
@@ -1206,7 +1237,8 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
},
btnOkColor:
Colors
.
blue
,
).
show
();
}
else
if
(
isTap
==
"Get TicketList Error 5001"
)
{
}
else
if
(
isTap
==
"Get TicketList Error 5001"
)
{
print
(
"Get TicketList Error 5001"
);
await
StartService
.
initLibrary
();
AwesomeDialog
(
...
...
@@ -1231,8 +1263,31 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
},
btnOkColor:
Colors
.
blue
,
).
show
();
}
else
{
print
(
"Error
$isTap
"
);
}
else
{
print
(
"Error Saat Topup Balance
$isTap
"
);
await
StartService
.
initLibrary
();
AwesomeDialog
(
context:
context
,
dialogType:
DialogType
.
info
,
animType:
AnimType
.
rightSlide
,
dismissOnTouchOutside:
false
,
headerAnimationLoop:
true
,
title:
"Terjadi Kesalahan Saat Isi Saldo"
,
titleTextStyle:
blackTextStyle
.
copyWith
(
fontSize:
20
,
fontWeight:
bold
,
),
desc:
"An Error Occurred When Topup Balance"
,
descTextStyle:
greyTextStyle
.
copyWith
(
fontSize:
18
,
fontWeight:
light
,
),
btnOkOnPress:
(){
countMax
=
0
;
tapBalance
();
}
).
show
();
}
}
});
...
...
@@ -1720,7 +1775,6 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
if
(
timer
!=
null
)
timer
?.
cancel
();
tapIdle
();
if
(
mounted
)
{
setState
(()
{
amountController
!.
text
=
...
...
@@ -1760,7 +1814,6 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
if
(
timer
!=
null
)
timer
?.
cancel
();
tapIdle
();
if
(
mounted
)
{
setState
(()
{
amountController
!.
text
=
...
...
@@ -2180,146 +2233,150 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
child:
FutureBuilder
(
future:
Future
.
delayed
(
Duration
(
seconds:
5
)),
builder:
(
context
,
snapshot
)
{
if
(
snapshot
.
connectionState
==
ConnectionState
.
waiting
)
{
return
Container
();
// Placeholder widget while waiting
}
else
{
return
TextButton
(
onPressed:
isProcessCheck
?
null
:
()
async
{
print
(
"Click-button-cancel"
);
setState
(()
{
isProcessCheck
=
true
;
});
try
{
bool
value
=
await
_cekStatus
();
if
(
value
)
{
isProcessGet
=
false
;
print
(
"pembayaran berhasil dilakukan"
);
Navigator
.
pop
(
context
);
showPop
(
approvalCode
);
}
else
{
await
AwesomeDialog
(
context:
context
,
dismissOnTouchOutside:
false
,
dialogType:
DialogType
.
warning
,
autoHide:
Duration
(
seconds:
3
),
animType:
AnimType
.
rightSlide
,
headerAnimationLoop:
true
,
title:
'Anda telah membatalkan transaksi'
,
desc:
"You have canceled the transaction"
,
).
show
().
then
((
value
)
{
Navigator
.
of
(
context
).
pop
();
timer
?.
cancel
();
dataQris
=
null
;
checkCountZero
=
false
;
isShowingDialog
=
true
;
_showTap
();
tapDial
();
});
}
}
catch
(
e
)
{
// Handle any errors that occur during _cekStatus()
}
finally
{
setState
(()
=>
isProcessCheck
=
false
);
if
(
snapshot
.
connectionState
==
ConnectionState
.
waiting
)
{
return
Container
();
// Placeholder widget while waiting
}
else
{
return
TextButton
(
onPressed:
isProcessCheck
?
null
:
()
async
{
print
(
"Click-button-cancel"
);
setState
(()
{
isProcessCheck
=
true
;
});
try
{
bool
value
=
await
_cekStatus
();
if
(
value
)
{
isProcessGet
=
false
;
print
(
"pembayaran berhasil dilakukan"
);
Navigator
.
pop
(
context
);
showPop
(
approvalCode
);
}
else
{
await
AwesomeDialog
(
context:
context
,
dismissOnTouchOutside:
false
,
dialogType:
DialogType
.
warning
,
autoHide:
Duration
(
seconds:
3
),
animType:
AnimType
.
rightSlide
,
headerAnimationLoop:
true
,
title:
'Anda telah membatalkan transaksi'
,
desc:
"You have canceled the transaction"
,
).
show
().
then
((
value
)
{
Navigator
.
of
(
context
).
pop
();
timer
?.
cancel
();
dataQris
=
null
;
checkCountZero
=
false
;
isShowingDialog
=
true
;
_showTap
();
tapDial
();
});
}
}
catch
(
e
)
{
// Handle any errors that occur during _cekStatus()
}
finally
{
setState
(
()
=>
isProcessCheck
=
false
);
}
},
child:
ButtonQris
(
iconUrl:
'assets/cancel.png'
,
title:
'batalkan'
,
subtitle:
'cancel'
,
),
);
}
},
child:
ButtonQris
(
iconUrl:
'assets/cancel.png'
,
title:
'batalkan'
,
subtitle:
'cancel'
,
),
);
}
},
)),
Visibility
(
visible:
isShowingButton
,
maintainState:
true
,
child:
FutureBuilder
(
future:
Future
.
delayed
(
Duration
(
seconds:
5
)),
builder:
(
context
,
snapshot
){
if
(
snapshot
.
connectionState
==
ConnectionState
.
waiting
){
return
Container
();
}
else
{
return
TextButton
(
onPressed:
isProcessCheck
?
null
:
()
async
{
AwesomeDialog
(
context:
context
,
dialogType:
DialogType
.
info
,
animType:
AnimType
.
rightSlide
,
dismissOnTouchOutside:
false
,
autoHide:
Duration
(
seconds:
2
),
headerAnimationLoop:
true
,
title:
'Mohon Tunggu Sebentar ...'
,
titleTextStyle:
blackTextStyle
.
copyWith
(
fontSize:
20
,
fontWeight:
bold
,
),
desc:
"Please wait a moment ..."
,
descTextStyle:
greyTextStyle
.
copyWith
(
fontSize:
18
,
fontWeight:
light
,
),
).
show
().
then
((
value
)
async
{
print
(
"Click-button-saya-sudah-bayar"
);
if
(
isProcessCheck
)
return
;
setState
(()
=>
isProcessCheck
=
true
);
try
{
bool
result
=
await
_cekStatus
();
if
(
result
)
{
isProcessGet
=
false
;
}
setState
(()
{
if
(
result
)
{
isProcessCheck
=
true
;
print
(
"pembayaran berhasil dilakukan"
);
Navigator
.
pop
(
context
);
showPop
(
approvalCode
);
}
else
{
isProcessCheck
=
false
;
future:
Future
.
delayed
(
Duration
(
seconds:
5
)),
builder:
(
context
,
snapshot
)
{
if
(
snapshot
.
connectionState
==
ConnectionState
.
waiting
)
{
return
Container
();
}
else
{
return
TextButton
(
onPressed:
isProcessCheck
?
null
:
()
async
{
AwesomeDialog
(
context:
context
,
dialogType:
DialogType
.
error
,
dialogType:
DialogType
.
info
,
animType:
AnimType
.
rightSlide
,
dismissOnTouchOutside:
false
,
autoHide:
Duration
(
seconds:
2
),
autoHide:
Duration
(
seconds:
2
),
headerAnimationLoop:
true
,
title:
'Belum Terbayar !'
,
desc:
"Not paid yet !"
,
btnOkIcon:
Icons
.
cancel
,
btnOkColor:
Colors
.
red
,
).
show
();
}
});
}
catch
(
e
)
{
print
(
"Error:
$e
"
);
setState
(()
=>
isProcessCheck
=
false
);
}
});
},
child:
ButtonQris
(
iconUrl:
'assets/check-mark.png'
,
title:
'Saya Sudah Bayar'
,
subtitle:
'i have already paid'
,
),
);
}
}
),
title:
'Mohon Tunggu Sebentar ...'
,
titleTextStyle:
blackTextStyle
.
copyWith
(
fontSize:
20
,
fontWeight:
bold
,
),
desc:
"Please wait a moment ..."
,
descTextStyle:
greyTextStyle
.
copyWith
(
fontSize:
18
,
fontWeight:
light
,
),
).
show
().
then
((
value
)
async
{
print
(
"Click-button-saya-sudah-bayar"
);
if
(
isProcessCheck
)
return
;
setState
(
()
=>
isProcessCheck
=
true
);
try
{
bool
result
=
await
_cekStatus
();
if
(
result
)
{
isProcessGet
=
false
;
}
setState
(()
{
if
(
result
)
{
isProcessCheck
=
true
;
print
(
"pembayaran berhasil dilakukan"
);
Navigator
.
pop
(
context
);
showPop
(
approvalCode
);
}
else
{
isProcessCheck
=
false
;
AwesomeDialog
(
context:
context
,
dialogType:
DialogType
.
error
,
animType:
AnimType
.
rightSlide
,
dismissOnTouchOutside:
false
,
autoHide:
Duration
(
seconds:
2
),
headerAnimationLoop:
true
,
title:
'Belum Terbayar !'
,
desc:
"Not paid yet !"
,
btnOkIcon:
Icons
.
cancel
,
btnOkColor:
Colors
.
red
,
).
show
();
}
});
}
catch
(
e
)
{
print
(
"Error:
$e
"
);
setState
(
()
=>
isProcessCheck
=
false
);
}
});
},
child:
ButtonQris
(
iconUrl:
'assets/check-mark.png'
,
title:
'Saya Sudah Bayar'
,
subtitle:
'i have already paid'
,
),
);
}
}),
),
// Time DI Menu Qris
Column
(
...
...
@@ -2358,8 +2415,10 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
animType:
AnimType
.
rightSlide
,
autoHide:
Duration
(
seconds:
2
),
headerAnimationLoop:
true
,
title:
'Waktu pembayaran anda sudah habis !'
,
desc:
"Your payment time has expired !"
,
title:
'Waktu pembayaran anda sudah habis !'
,
desc:
"Your payment time has expired !"
,
btnOkIcon:
Icons
.
cancel
,
btnOkColor:
Colors
.
red
)
.
show
()
...
...
@@ -2372,7 +2431,8 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
setState
(()
{
if
(
result
)
{
isProcessGet
=
false
;
print
(
"pembayaran berhasil dilakukan"
);
print
(
"pembayaran berhasil dilakukan"
);
Navigator
.
pop
(
context
);
showPop
(
approvalCode
);
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment