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
6cebd57a
Commit
6cebd57a
authored
Aug 08, 2023
by
Izol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjust internet connection
tap idle, dial , topup balance
parent
dd0f665a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
home_page.dart
lib/ui/pages/home_page.dart
+58
-0
No files found.
lib/ui/pages/home_page.dart
View file @
6cebd57a
...
...
@@ -968,6 +968,25 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
// }
void
tapIdle
()
{
var
connectivityResult
=
Connectivity
().
checkConnectivity
();
if
(
connectivityResult
==
ConnectivityResult
.
none
)
{
AwesomeDialog
(
context:
context
,
dialogType:
DialogType
.
error
,
animType:
AnimType
.
rightSlide
,
dismissOnTouchOutside:
false
,
headerAnimationLoop:
true
,
title:
'Internet Tidak Tersedia'
,
desc:
'Tidak ada koneksi internet. Pastikan Anda terhubung ke internet untuk melanjutkan.'
,
btnOkOnPress:
()
{
tapIdle
();
},
btnOkIcon:
Icons
.
error
,
btnOkColor:
Colors
.
red
,
).
show
();
return
;
// Exit the method if no internet
}
int
duration
=
int
.
parse
(
idle
);
idleDuration
.
value
=
duration
;
// set nilai awal untuk idleDuration
int
count
=
0
;
...
...
@@ -1049,6 +1068,25 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
}
void
tapDial
()
async
{
var
connectivityResult
=
await
Connectivity
().
checkConnectivity
();
if
(
connectivityResult
==
ConnectivityResult
.
none
)
{
AwesomeDialog
(
context:
context
,
dialogType:
DialogType
.
error
,
animType:
AnimType
.
rightSlide
,
dismissOnTouchOutside:
false
,
headerAnimationLoop:
true
,
title:
'Internet Tidak Tersedia'
,
desc:
'Tidak ada koneksi internet. Pastikan Anda terhubung ke internet untuk melanjutkan.'
,
btnOkOnPress:
()
{
tapDial
();
},
btnOkIcon:
Icons
.
error
,
btnOkColor:
Colors
.
red
,
).
show
();
return
;
// Exit the method if no internet
}
Future
.
delayed
(
const
Duration
(
milliseconds:
500
),
()
async
{
var
isTap
=
await
StartService
.
getCard
();
try
{
...
...
@@ -1062,6 +1100,26 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
}
void
tapBalance
()
async
{
var
connectivityResult
=
await
Connectivity
().
checkConnectivity
();
if
(
connectivityResult
==
ConnectivityResult
.
none
)
{
AwesomeDialog
(
context:
context
,
dialogType:
DialogType
.
error
,
animType:
AnimType
.
rightSlide
,
dismissOnTouchOutside:
false
,
headerAnimationLoop:
true
,
title:
'Internet Tidak Tersedia'
,
desc:
'Tidak ada koneksi internet. Pastikan Anda terhubung ke internet untuk melanjutkan.'
,
btnOkOnPress:
()
{
countMax
=
0
;
tapBalance
();
},
btnOkIcon:
Icons
.
error
,
btnOkColor:
Colors
.
red
,
).
show
();
return
;
// Exit the method if no internet
}
Future
.
delayed
(
const
Duration
(
milliseconds:
500
),
()
async
{
// await StartService.initLibrary();
var
isTap
=
await
StartService
.
getCard
();
...
...
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