Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Hoàng Văn Đạt
mypoint_flutter_app
Commits
c285d072
Commit
c285d072
authored
May 05, 2025
by
DatHV
Browse files
update game center
parent
8d264762
Changes
24
Hide whitespace changes
Inline
Side-by-side
lib/screen/voucher/voucher_list/voucher_list_screen.dart
View file @
c285d072
import
'package:flutter/material.dart'
;
import
'package:get/get.dart'
;
import
'../../../shared/router_gage.dart'
;
import
'../../../widgets/custom_empty_widget.dart'
;
import
'../../../widgets/custom_navigation_bar.dart'
;
import
'../../../widgets/custom_search_navigation_bar.dart'
;
...
...
@@ -79,7 +80,12 @@ class _VoucherListScreenState extends State<VoucherListScreen> {
);
}
final
product
=
_viewModel
.
products
[
index
];
return
VoucherListItem
(
product:
product
);
return
GestureDetector
(
onTap:
()
{
Get
.
toNamed
(
voucherDetailScreen
,
arguments:
product
.
id
);
},
child:
VoucherListItem
(
product:
product
),
);
},
),
);
...
...
@@ -90,4 +96,4 @@ class _VoucherListScreenState extends State<VoucherListScreen> {
),
);
}
}
}
\ No newline at end of file
lib/shared/router_gage.dart
View file @
c285d072
import
'package:get/get_navigation/src/routes/get_route.dart'
;
import
'../screen/game/game_cards/game_card_screen.dart'
;
import
'../screen/login/login_screen.dart'
;
import
'../screen/main_tab_screen/main_tab_screen.dart'
;
import
'../screen/onboarding/onboarding_screen.dart'
;
...
...
@@ -14,6 +15,7 @@ const mainScreen = '/main';
const
settingScreen
=
'/setting'
;
const
vouchersScreen
=
'/vouchers'
;
const
voucherDetailScreen
=
'/voucherDetail'
;
const
gameCardScreen
=
'/gameCardScreen'
;
class
RouterPage
{
static
List
<
GetPage
>
pages
()
{
...
...
@@ -31,6 +33,7 @@ class RouterPage {
GetPage
(
name:
settingScreen
,
page:
()
=>
const
SettingScreen
()),
GetPage
(
name:
vouchersScreen
,
page:
()
=>
VoucherListScreen
(),),
GetPage
(
name:
voucherDetailScreen
,
page:
()
=>
VoucherDetailScreen
(),),
GetPage
(
name:
gameCardScreen
,
page:
()
=>
GameCardScreen
(),),
];
}
}
lib/widgets/custom_point_text_tag.dart
0 → 100644
View file @
c285d072
import
'package:flutter/material.dart'
;
import
'package:intl/intl.dart'
;
import
'../extensions/num_extension.dart'
;
import
'../screen/voucher/models/cash_type.dart'
;
class
CustomPointText
extends
StatelessWidget
{
final
int
point
;
final
CashType
?
type
;
bool
get
isFree
=>
point
==
0
;
CurrencyUnit
get
currencyUnit
=>
type
==
CashType
.
point
?
CurrencyUnit
.
point
:
CurrencyUnit
.
vnd
;
const
CustomPointText
({
super
.
key
,
required
this
.
point
,
this
.
type
,
});
@override
Widget
build
(
BuildContext
context
)
{
return
Row
(
mainAxisSize:
MainAxisSize
.
min
,
children:
[
Image
.
asset
(
'assets/images/ic_point.png'
,
width:
16
,
height:
16
),
const
SizedBox
(
width:
4
),
Text
(
isFree
?
'Miễn phí'
:
point
.
money
(
currencyUnit
),
style:
TextStyle
(
fontSize:
12
,
color:
Colors
.
black
,
fontWeight:
FontWeight
.
bold
,
),
),
],
);
}
}
lib/widgets/custom_price_tag.dart
View file @
c285d072
...
...
@@ -22,14 +22,14 @@ class PriceTagWidget extends StatelessWidget {
child:
Row
(
mainAxisSize:
MainAxisSize
.
min
,
children:
[
Image
.
asset
(
'assets/images/ic_point.png'
,
width:
16
,
height:
1
4
),
Image
.
asset
(
'assets/images/ic_point.png'
,
width:
16
,
height:
1
6
),
const
SizedBox
(
width:
4
),
Text
(
isFree
?
'Miễn phí'
:
point
.
money
(
CurrencyUnit
.
none
),
style:
TextStyle
(
fontSize:
12
,
color:
Colors
.
black
,
fontWeight:
FontWeight
.
w500
,
fontWeight:
FontWeight
.
bold
,
),
),
],
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
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