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
Hide 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
...
...
@@ -30,4 +30,5 @@ This project is a starting point for a Flutter application.
**
remove icon printer ✅
**
change icon reload ✅
**
add datetime in history saldo & ticket ✅
**
add scrollable effect to table history ✅
\ No newline at end of file
**
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>
List
<
Map
<
String
,
dynamic
>>
ticketHistoryData
=
[];
ScrollController
_scrollController
=
ScrollController
();
bool
showShimmer
=
false
;
bool
shouldShowBalanceAndTicketSections
=
false
;
@override
void
initState
()
{
...
...
@@ -349,9 +350,10 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
print
(
'APP VERSION SELFSERVICE:
$appVersion
'
);
RegExp
regExp
=
RegExp
(
r'www'
,
caseSensitive:
false
);
String
imageLogoShowTap
=
regExp
.
hasMatch
(
appVersion
)
?
'assets/wahoo.png'
:
''
;
String
imageLogoShowTap
=
regExp
.
hasMatch
(
appVersion
)
?
'assets/wahoo.png'
:
''
;
print
(
'imageLogoShowTap:
$imageLogoShowTap
'
);
shouldShowBalanceAndTicketSections
=
!
regExp
.
hasMatch
(
appVersion
);
return
imageLogoShowTap
;
}
...
...
@@ -591,6 +593,8 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
Widget
build
(
BuildContext
context
)
{
double
screenWidth
=
MediaQuery
.
of
(
context
).
size
.
width
;
double
screenHeight
=
MediaQuery
.
of
(
context
).
size
.
height
;
_getImageLogoShowTap
();
return
Listener
(
onPointerDown:
(
details
)
{
if
(
timer
!=
null
)
timer
?.
cancel
();
...
...
@@ -616,66 +620,69 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
Column
(
children:
[
Container
(
width:
screenWidth
*
0.10
,
// Container untuk spasi di kiri
width:
screenWidth
*
0.10
,
),
Container
(
width:
screenWidth
*
0.70
,
height:
screenHeight
*
0.80
,
child:
showShimmer
?
Shimmer
(
gradient:
LinearGradient
(
begin:
Alignment
.
centerLeft
,
end:
Alignment
.
centerRight
,
colors:
[
Colors
.
white
,
veryLightTextColor
,
Colors
.
white
,
],
),
child:
buildWalletSection
()
)
gradient:
LinearGradient
(
begin:
Alignment
.
centerLeft
,
end:
Alignment
.
centerRight
,
colors:
[
Colors
.
white
,
veryLightTextColor
,
Colors
.
white
,
],
),
child:
buildWalletSection
(),
)
:
buildWalletSection
(),
),
Container
(
margin:
EdgeInsets
.
fromLTRB
(
30
,
0
,
0
,
0
),
width:
screenWidth
*
0.95
,
height:
screenHeight
*
0.70
,
// Container untuk "balance section"
child:
showShimmer
child:
shouldShowBalanceAndTicketSections
?
(
showShimmer
?
Shimmer
(
gradient:
LinearGradient
(
begin:
Alignment
.
centerLeft
,
end:
Alignment
.
centerRight
,
colors:
[
Colors
.
white
,
veryLightTextColor
,
Colors
.
white
,
// Ivory (Putih Kuning Muda)
],
),
child:
buildBalanceSection
()
gradient:
LinearGradient
(
begin:
Alignment
.
centerLeft
,
end:
Alignment
.
centerRight
,
colors:
[
Colors
.
white
,
veryLightTextColor
,
Colors
.
white
,
],
),
child:
buildBalanceSection
(),
)
:
buildBalanceSection
(),
:
buildBalanceSection
())
:
SizedBox
(),
// Hide balance section
),
SizedBox
(
height:
20
),
Container
(
margin:
EdgeInsets
.
fromLTRB
(
30
,
0
,
0
,
0
),
width:
screenWidth
*
0.95
,
height:
screenHeight
*
0.70
,
child:
showShimmer
?
Shimmer
(
gradient:
LinearGradient
(
begin:
Alignment
.
centerLeft
,
end:
Alignment
.
centerRight
,
colors:
[
Colors
.
white
,
veryLightTextColor
,
Colors
.
white
,
// Ivory (Putih Kuning Muda)
],
),
child:
buildTicketSection
()
)
:
buildTicketSection
()),
margin:
EdgeInsets
.
fromLTRB
(
30
,
0
,
0
,
0
),
width:
screenWidth
*
0.95
,
height:
screenHeight
*
0.70
,
child:
shouldShowBalanceAndTicketSections
?
(
showShimmer
?
Shimmer
(
gradient:
LinearGradient
(
begin:
Alignment
.
centerLeft
,
end:
Alignment
.
centerRight
,
colors:
[
Colors
.
white
,
veryLightTextColor
,
Colors
.
white
,
],
),
child:
buildTicketSection
(),
)
:
buildTicketSection
())
:
SizedBox
(),
// Hide ticket section
),
SizedBox
(
height:
20
),
],
),
...
...
@@ -683,40 +690,39 @@ class _HomePageCheckBalanceState extends State<HomePageCheckBalance>
),
),
Positioned
(
bottom:
90.0
,
// Adjust the position as needed
right:
5.0
,
// Adjust the position as needed
child:
showShimmer
bottom:
90.0
,
right:
5.0
,
child:
showShimmer
?
Shimmer
(
gradient:
LinearGradient
(
begin:
Alignment
.
centerLeft
,
end:
Alignment
.
centerRight
,
colors:
[
Colors
.
white
,
veryLightTextColor
,
Colors
.
white
,
// Ivory (Putih Kuning Muda)
],
),
child:
FloatingActionButton
(
backgroundColor:
purpleColor
,
onPressed:
()
{},
child:
Icon
(
Icons
.
sync
,
color:
Colors
.
white
,
),
gradient:
LinearGradient
(
begin:
Alignment
.
centerLeft
,
end:
Alignment
.
centerRight
,
colors:
[
Colors
.
white
,
veryLightTextColor
,
Colors
.
white
,
],
),
child:
FloatingActionButton
(
backgroundColor:
purpleColor
,
onPressed:
()
{},
child:
Icon
(
Icons
.
sync
,
color:
Colors
.
white
,
),
)
:
FloatingActionButton
(
),
)
:
FloatingActionButton
(
backgroundColor:
purpleColor
,
onPressed:
()
async
{
// Add the action for your floating button
onPressed:
()
{
_scrollController
.
animateTo
(
0.0
,
// Ganti dengan posisi yang sesuai (biasanya 0.0 untuk pindah ke atas)
duration:
Duration
(
milliseconds:
500
),
// Durasi animasi
curve:
Curves
.
easeInOut
,
// Efek animasi
duration:
Duration
(
milliseconds:
500
),
curve:
Curves
.
easeInOut
,
);
if
(
timer
!=
null
)
timer
?.
cancel
();
isShowingDialog
=
true
;
timer
?.
cancel
()
;
checkCountZero
=
false
;
_showTap
(
context
);
tapDial
(
context
);
},
...
...
@@ -726,52 +732,23 @@ 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
(
bottom:
100.0
,
// Adjust the position as needed
right:
14.5
,
// Adjust the position as needed
child:
showShimmer
bottom:
100.0
,
right:
14.5
,
child:
showShimmer
?
Shimmer
(
gradient:
LinearGradient
(
begin:
Alignment
.
centerLeft
,
end:
Alignment
.
centerRight
,
colors:
[
Colors
.
white
,
veryLightTextColor
,
Colors
.
white
,
// Ivory (Putih Kuning Muda)
],
),
child:
buildTimerSection
(
context
)
):
buildTimerSection
(
context
),
gradient:
LinearGradient
(
begin:
Alignment
.
centerLeft
,
end:
Alignment
.
centerRight
,
colors:
[
Colors
.
white
,
veryLightTextColor
,
Colors
.
white
,
],
),
child:
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