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
ee52f03d
Commit
ee52f03d
authored
Oct 23, 2023
by
Faizol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update version , added seting layout balance & ticket
parent
c273ad77
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
117 deletions
+95
-117
README.md
README.md
+2
-1
app-release.apk
android/app/release/app-release.apk
+0
-0
home_page_check_balance.dart
lib/ui/pages/home_page_check_balance.dart
+93
-116
No files found.
README.md
View file @
ee52f03d
...
@@ -31,3 +31,4 @@ This project is a starting point for a Flutter application.
...
@@ -31,3 +31,4 @@ This project is a starting point for a Flutter application.
**
change icon reload ✅
**
change icon reload ✅
**
add datetime in history saldo & ticket ✅
**
add datetime in history saldo & ticket ✅
**
add scrollable effect to table history ✅
**
add scrollable effect to table history ✅
**
added setting prefix history balance and ticket ✅
\ No newline at end of file
android/app/release/app-release.apk
View file @
ee52f03d
No preview for this file type
lib/ui/pages/home_page_check_balance.dart
View file @
ee52f03d
...
@@ -59,6 +59,7 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
...
@@ -59,6 +59,7 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
List
<
Map
<
String
,
dynamic
>>
ticketHistoryData
=
[];
List
<
Map
<
String
,
dynamic
>>
ticketHistoryData
=
[];
ScrollController
_scrollController
=
ScrollController
();
ScrollController
_scrollController
=
ScrollController
();
bool
showShimmer
=
false
;
bool
showShimmer
=
false
;
bool
shouldShowBalanceAndTicketSections
=
false
;
@override
@override
void
initState
()
{
void
initState
()
{
...
@@ -349,9 +350,10 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
...
@@ -349,9 +350,10 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
print
(
'APP VERSION SELFSERVICE:
$appVersion
'
);
print
(
'APP VERSION SELFSERVICE:
$appVersion
'
);
RegExp
regExp
=
RegExp
(
r'www'
,
caseSensitive:
false
);
RegExp
regExp
=
RegExp
(
r'www'
,
caseSensitive:
false
);
String
imageLogoShowTap
=
String
imageLogoShowTap
=
regExp
.
hasMatch
(
appVersion
)
?
'assets/wahoo.png'
:
''
;
regExp
.
hasMatch
(
appVersion
)
?
'assets/wahoo.png'
:
''
;
print
(
'imageLogoShowTap:
$imageLogoShowTap
'
);
print
(
'imageLogoShowTap:
$imageLogoShowTap
'
);
shouldShowBalanceAndTicketSections
=
!
regExp
.
hasMatch
(
appVersion
);
return
imageLogoShowTap
;
return
imageLogoShowTap
;
}
}
...
@@ -591,6 +593,8 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
...
@@ -591,6 +593,8 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
double
screenWidth
=
MediaQuery
.
of
(
context
).
size
.
width
;
double
screenWidth
=
MediaQuery
.
of
(
context
).
size
.
width
;
double
screenHeight
=
MediaQuery
.
of
(
context
).
size
.
height
;
double
screenHeight
=
MediaQuery
.
of
(
context
).
size
.
height
;
_getImageLogoShowTap
();
return
Listener
(
return
Listener
(
onPointerDown:
(
details
)
{
onPointerDown:
(
details
)
{
if
(
timer
!=
null
)
timer
?.
cancel
();
if
(
timer
!=
null
)
timer
?.
cancel
();
...
@@ -616,8 +620,7 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
...
@@ -616,8 +620,7 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
Column
(
Column
(
children:
[
children:
[
Container
(
Container
(
width:
screenWidth
*
width:
screenWidth
*
0.10
,
0.10
,
// Container untuk spasi di kiri
),
),
Container
(
Container
(
width:
screenWidth
*
0.70
,
width:
screenWidth
*
0.70
,
...
@@ -633,7 +636,7 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
...
@@ -633,7 +636,7 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
Colors
.
white
,
Colors
.
white
,
],
],
),
),
child:
buildWalletSection
()
child:
buildWalletSection
(),
)
)
:
buildWalletSection
(),
:
buildWalletSection
(),
),
),
...
@@ -641,8 +644,8 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
...
@@ -641,8 +644,8 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
margin:
EdgeInsets
.
fromLTRB
(
30
,
0
,
0
,
0
),
margin:
EdgeInsets
.
fromLTRB
(
30
,
0
,
0
,
0
),
width:
screenWidth
*
0.95
,
width:
screenWidth
*
0.95
,
height:
screenHeight
*
0.70
,
height:
screenHeight
*
0.70
,
// Container untuk "balance section"
child:
shouldShowBalanceAndTicketSections
child:
showShimmer
?
(
showShimmer
?
Shimmer
(
?
Shimmer
(
gradient:
LinearGradient
(
gradient:
LinearGradient
(
begin:
Alignment
.
centerLeft
,
begin:
Alignment
.
centerLeft
,
...
@@ -650,19 +653,21 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
...
@@ -650,19 +653,21 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
colors:
[
colors:
[
Colors
.
white
,
Colors
.
white
,
veryLightTextColor
,
veryLightTextColor
,
Colors
.
white
,
// Ivory (Putih Kuning Muda)
Colors
.
white
,
],
],
),
),
child:
buildBalanceSection
()
child:
buildBalanceSection
(),
)
)
:
buildBalanceSection
(),
:
buildBalanceSection
())
:
SizedBox
(),
// Hide balance section
),
),
SizedBox
(
height:
20
),
SizedBox
(
height:
20
),
Container
(
Container
(
margin:
EdgeInsets
.
fromLTRB
(
30
,
0
,
0
,
0
),
margin:
EdgeInsets
.
fromLTRB
(
30
,
0
,
0
,
0
),
width:
screenWidth
*
0.95
,
width:
screenWidth
*
0.95
,
height:
screenHeight
*
0.70
,
height:
screenHeight
*
0.70
,
child:
showShimmer
child:
shouldShowBalanceAndTicketSections
?
(
showShimmer
?
Shimmer
(
?
Shimmer
(
gradient:
LinearGradient
(
gradient:
LinearGradient
(
begin:
Alignment
.
centerLeft
,
begin:
Alignment
.
centerLeft
,
...
@@ -670,12 +675,14 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
...
@@ -670,12 +675,14 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
colors:
[
colors:
[
Colors
.
white
,
Colors
.
white
,
veryLightTextColor
,
veryLightTextColor
,
Colors
.
white
,
// Ivory (Putih Kuning Muda)
Colors
.
white
,
],
],
),
),
child:
buildTicketSection
()
child:
buildTicketSection
(),
)
)
:
buildTicketSection
()),
:
buildTicketSection
())
:
SizedBox
(),
// Hide ticket section
),
SizedBox
(
height:
20
),
SizedBox
(
height:
20
),
],
],
),
),
...
@@ -683,9 +690,9 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
...
@@ -683,9 +690,9 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
),
),
),
),
Positioned
(
Positioned
(
bottom:
90.0
,
// Adjust the position as needed
bottom:
90.0
,
right:
5.0
,
// Adjust the position as needed
right:
5.0
,
child:
showShimmer
child:
showShimmer
?
Shimmer
(
?
Shimmer
(
gradient:
LinearGradient
(
gradient:
LinearGradient
(
begin:
Alignment
.
centerLeft
,
begin:
Alignment
.
centerLeft
,
...
@@ -693,7 +700,7 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
...
@@ -693,7 +700,7 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
colors:
[
colors:
[
Colors
.
white
,
Colors
.
white
,
veryLightTextColor
,
veryLightTextColor
,
Colors
.
white
,
// Ivory (Putih Kuning Muda)
Colors
.
white
,
],
],
),
),
child:
FloatingActionButton
(
child:
FloatingActionButton
(
...
@@ -704,19 +711,18 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
...
@@ -704,19 +711,18 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
color:
Colors
.
white
,
color:
Colors
.
white
,
),
),
),
),
)
:
FloatingActionButton
(
)
:
FloatingActionButton
(
backgroundColor:
purpleColor
,
backgroundColor:
purpleColor
,
onPressed:
()
async
{
onPressed:
()
{
// Add the action for your floating button
_scrollController
.
animateTo
(
_scrollController
.
animateTo
(
0.0
,
0.0
,
// Ganti dengan posisi yang sesuai (biasanya 0.0 untuk pindah ke atas)
duration:
Duration
(
milliseconds:
500
),
duration:
Duration
(
milliseconds:
500
),
// Durasi animasi
curve:
Curves
.
easeInOut
,
curve:
Curves
.
easeInOut
,
// Efek animasi
);
);
if
(
timer
!=
null
)
timer
?.
cancel
();
isShowingDialog
=
true
;
isShowingDialog
=
true
;
timer
?.
cancel
()
;
checkCountZero
=
false
;
_showTap
(
context
);
_showTap
(
context
);
tapDial
(
context
);
tapDial
(
context
);
},
},
...
@@ -726,40 +732,10 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
...
@@ -726,40 +732,10 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
),
),
),
),
),
),
// Positioned(
// bottom: 100.0, // Adjust the position as needed
// right: 20.0, // Adjust the position as needed
// child: FloatingActionButton(
// onPressed: () {
// showToastMessage('Maaf , fitur tidak tersedia');
//Nyalakan kembali jika dibutuhkan
// Konversi data ke JSON
// String jsonBalance = json.encode(balanceHistoryData);
// name;
// cardNumber;
// cardExpirity;
// cardType;
// deposit;
// balance;
// Memanggil metode printHistory dengan data yang sudah diperbarui
// StartService.printHistory(
// jsonBalance,
// name,
// cardNumber,
// cardExpirity,
// cardType,
// deposit,
// balance
// );
// },
// child: Icon(Icons.print),
// ),
// ),
Positioned
(
Positioned
(
bottom:
100.0
,
// Adjust the position as needed
bottom:
100.0
,
right:
14.5
,
// Adjust the position as needed
right:
14.5
,
child:
showShimmer
child:
showShimmer
?
Shimmer
(
?
Shimmer
(
gradient:
LinearGradient
(
gradient:
LinearGradient
(
begin:
Alignment
.
centerLeft
,
begin:
Alignment
.
centerLeft
,
...
@@ -767,11 +743,12 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
...
@@ -767,11 +743,12 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
colors:
[
colors:
[
Colors
.
white
,
Colors
.
white
,
veryLightTextColor
,
veryLightTextColor
,
Colors
.
white
,
// Ivory (Putih Kuning Muda)
Colors
.
white
,
],
],
),
),
child:
buildTimerSection
(
context
)
child:
buildTimerSection
(
context
),
):
buildTimerSection
(
context
),
)
:
buildTimerSection
(
context
),
),
),
],
],
),
),
...
...
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