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
682ab1de
Commit
682ab1de
authored
Dec 31, 2025
by
DatHV
Browse files
fix bug.
parent
1edd930e
Changes
36
Hide whitespace changes
Inline
Side-by-side
assets/config/env.json
View file @
682ab1de
{
"flavor"
:
"
pro
"
,
"baseUrl"
:
"https://api.mypoint.com.vn/8854/gup2start/rest"
,
"t3Token"
:
"runner-env-
t3Token-pro
"
,
"enableLogging"
:
fals
e
"flavor"
:
"
dev
"
,
"baseUrl"
:
"https://api.
sandbox.
mypoint.com.vn/8854/gup2start/rest"
,
"t3Token"
:
"runner-env-
flavor-dev
"
,
"enableLogging"
:
tru
e
}
ios/.env_scheme
View file @
682ab1de
stg
dev
ios/Runner.xcodeproj/project.pbxproj
View file @
682ab1de
...
...
@@ -738,6 +738,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CLANG_ENABLE_MODULES
=
YES
;
CODE_SIGN_ENTITLEMENTS
=
Runner/Runner.entitlements
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Distribution"
;
CODE_SIGN_STYLE
=
Manual
;
CURRENT_PROJECT_VERSION
=
1
;
DEVELOPMENT_TEAM
=
""
;
...
...
@@ -753,7 +754,7 @@
PRODUCT_BUNDLE_IDENTIFIER
=
com.icom.vn.MyPoint
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]"
=
"MyPoint
development
"
;
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]"
=
"MyPoint
Adhoc Distribution
"
;
SWIFT_OBJC_BRIDGING_HEADER
=
"Runner/Runner-Bridging-Header.h"
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Onone"
;
SWIFT_VERSION
=
5.0
;
...
...
lib/core/network/restful_api_client_all_request.dart
View file @
682ab1de
...
...
@@ -114,10 +114,13 @@ extension RestfulAPIClientAllRequest on RestfulAPIClient {
);
}
Future
<
BaseResponseModel
<
CreateOTPResponseModel
>>
verifyDeleteAccount
(
String
otp
)
async
{
Future
<
BaseResponseModel
<
OTPVerifyResponseModel
>>
verifyDeleteAccount
(
String
otp
)
async
{
String
?
token
=
DataPreference
.
instance
.
token
??
""
;
return
requestNormal
(
APIPaths
.
verifyDeleteAccount
,
Method
.
POST
,
{
"otp"
:
otp
,
},
(
data
)
=>
CreateOTPResponseModel
.
fromJson
(
data
as
Json
));
"access_token"
:
token
,
"lang"
:
"vi"
,
},
(
data
)
=>
OTPVerifyResponseModel
.
fromJson
(
data
as
Json
));
}
Future
<
BaseResponseModel
<
EmptyCodable
>>
signup
(
String
phone
,
String
password
)
async
{
...
...
lib/core/services/web/x_app_sdk_service.dart
View file @
682ab1de
...
...
@@ -80,7 +80,7 @@ class XAppSDKService {
final
errorMessage
=
message
?.
toString
();
final
tokenString
=
data
?.
toString
().
orEmpty
??
''
;
final
isPlaceholder
=
tokenString
.
trim
().
toLowerCase
().
contains
(
"tokenex.tokenex"
);
print
(
'🔍 XAppSDKService: getToken result - status:
$status
, token
length
:
${tokenString}
, isPlaceholder:
$isPlaceholder
'
);
print
(
'🔍 XAppSDKService: getToken result - status:
$status
, token:
${tokenString}
, isPlaceholder:
$isPlaceholder
'
);
if
(
status
==
'success'
&&
data
!=
null
&&
tokenString
.
isNotEmpty
&&
!
isPlaceholder
)
{
_cachedToken
=
tokenString
;
_lastError
=
null
;
...
...
lib/features/affiliate/affiliate_tab_screen.dart
View file @
682ab1de
...
...
@@ -34,7 +34,7 @@ class _AffiliateTabScreenState extends BaseState<AffiliateTabScreen> with BasicS
super
.
initState
();
final
args
=
Get
.
arguments
;
if
(
args
is
Map
)
{
_canBackButton
=
args
[
'can_back_button'
]
as
bool
;
_canBackButton
=
args
[
'can_back_button'
]
as
bool
?
??
false
;
}
viewModel
.
onShowAffiliateBrandPopup
=
(
data
)
{
if
(!
mounted
)
return
;
...
...
lib/features/create_pass/create_pass_screen.dart
View file @
682ab1de
...
...
@@ -21,6 +21,7 @@ class CreatePasswordScreen extends StatelessWidget {
return
Scaffold
(
body:
SafeArea
(
top:
false
,
child:
Stack
(
children:
[
GestureDetector
(
...
...
lib/features/create_pass/create_pass_viewmodel.dart
View file @
682ab1de
...
...
@@ -21,6 +21,10 @@ class CreatePasswordViewModel extends GetxController {
}
void
_validate
()
{
if
(
newPassword
.
value
.
length
!=
6
)
{
isButtonEnabled
.
value
=
false
;
return
;
}
if
(
newPassword
.
value
.
isEmpty
||
confirmPassword
.
value
.
isEmpty
)
{
errorMessage
.
value
=
""
;
isButtonEnabled
.
value
=
false
;
...
...
lib/features/daily_checkin/daily_checkin_viewmodel.dart
View file @
682ab1de
...
...
@@ -10,7 +10,7 @@ class DailyCheckInViewModel extends RestfulApiViewModel {
void
Function
(
SubmitCheckInData
?
data
)?
submitDataResponse
;
bool
get
todayIsChecked
{
final
counter
=
checkInData
.
value
?.
counters
?.
first
;
final
counter
=
checkInData
.
value
?.
dailyCounter
;
final
items
=
counter
?.
values
??
[];
return
(
items
.
firstOrNull
?.
counterValue
??
''
)
==
'1'
;
}
...
...
lib/features/device_manager/device_manager_screen.dart
View file @
682ab1de
...
...
@@ -60,8 +60,9 @@ class _DeviceManagerScreenState extends BaseState<DeviceManagerScreen> with Basi
if
(
logoutDisplayDevices
.
isNotEmpty
)
Center
(
child:
TextButton
(
onPressed:
()
{
Get
.
to
(()
=>
LoggedOutDeviceScreen
());
onPressed:
()
async
{
await
Get
.
to
(()
=>
LoggedOutDeviceScreen
());
_refresh
();
},
child:
Text
(
'Xem tất cả thiết bị đã đăng xuất (
${logoutDevices.length}
)'
,
...
...
lib/features/game/game_tab_screen.dart
View file @
682ab1de
...
...
@@ -32,7 +32,7 @@ class _GameTabScreenState extends BaseState<GameTabScreen> with BasicState, Popu
super
.
initState
();
final
args
=
Get
.
arguments
;
if
(
args
is
Map
)
{
_canBackButton
=
args
[
'can_back_button'
]
as
bool
;
_canBackButton
=
args
[
'can_back_button'
]
as
bool
?
??
false
;
}
_viewModel
.
getGames
();
_viewModel
.
onShowAlertError
=
(
message
)
{
...
...
lib/features/home/custom_widget/header_home_widget.dart
View file @
682ab1de
...
...
@@ -66,13 +66,18 @@ class HomeGreetingHeader extends StatelessWidget {
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
GestureDetector
(
onTap:
_onProfileTap
,
child:
Text
(
'Xin chào
$name
!'
,
style:
TextStyle
(
fontSize:
18
,
fontWeight:
FontWeight
.
bold
,
color:
Colors
.
black87
),
Expanded
(
child:
GestureDetector
(
onTap:
_onProfileTap
,
child:
Text
(
'Xin chào
$name
!'
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontSize:
18
,
fontWeight:
FontWeight
.
bold
,
color:
Colors
.
black87
),
),
),
),
const
SizedBox
(
width:
8
),
Row
(
children:
[
GestureDetector
(
...
...
lib/features/home/header_home_viewmodel.dart
View file @
682ab1de
...
...
@@ -94,4 +94,5 @@ class HeaderHomeViewModel extends GetxController {
}
Future
<
void
>
freshData
()
=>
_repository
.
_load
(
withLoading:
false
);
Future
<
void
>
fetchNotificationUnread
()
=>
_repository
.
_fetchNotificationUnread
();
}
lib/features/home/home_screen.dart
View file @
682ab1de
import
'package:flutter/material.dart'
;
import
'package:get/get.dart'
;
import
'package:mypoint_flutter_app/shared/navigation/directional_screen.dart'
;
import
'../../features/home/custom_widget/header_home_widget.dart'
;
import
'../../features/home/custom_widget/product_grid_widget.dart'
;
import
'../../features/pipi/pipi_detail_screen.dart'
;
...
...
@@ -203,6 +204,8 @@ class _HomeScreenState extends BaseState<HomeScreen> with PopupOnInit, BasicStat
}
void
_handleHoverViewTap
()
{
// final direction = DirectionalScreen.buildByName(name: DirectionalScreenName.campaignSevenDayScreen, clickActionParam: "0");
// direction?.begin();
final
result
=
_viewModel
.
hoverData
.
value
?.
direction
?.
begin
();
if
(
result
!=
true
)
{
showModalBottomSheet
(
...
...
@@ -250,6 +253,7 @@ class _HomeScreenState extends BaseState<HomeScreen> with PopupOnInit, BasicStat
@override
void
onRouteDidAppear
()
{
super
.
onRouteDidAppear
();
_headerHomeVM
.
fetchNotificationUnread
();
if
(
_viewModel
.
hoverDismissed
)
return
;
_viewModel
.
loadDataPiPiHome
();
}
...
...
lib/features/interested_categories/interestied_categories_screen.dart
View file @
682ab1de
...
...
@@ -106,6 +106,8 @@ class _InterestCategoriesScreenState extends BaseState<InterestCategoriesScreen>
}
Widget
_buildBottomButton
()
{
final
bool
hasSelection
=
_viewModel
.
selectedIds
.
isNotEmpty
;
final
bool
canSubmit
=
_onChange
&&
hasSelection
;
return
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
16
,
vertical:
16
),
decoration:
const
BoxDecoration
(
...
...
@@ -116,13 +118,13 @@ class _InterestCategoriesScreenState extends BaseState<InterestCategoriesScreen>
top:
false
,
child:
ElevatedButton
(
onPressed:
_onChange
canSubmit
?
()
{
_viewModel
.
submitInterestedCategories
();
}
:
null
,
style:
ElevatedButton
.
styleFrom
(
backgroundColor:
_onChange
?
BaseColor
.
primary500
:
Colors
.
grey
,
backgroundColor:
canSubmit
?
BaseColor
.
primary500
:
Colors
.
grey
,
minimumSize:
const
Size
.
fromHeight
(
52
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
16
)),
),
...
...
@@ -130,7 +132,7 @@ class _InterestCategoriesScreenState extends BaseState<InterestCategoriesScreen>
'Cập nhật'
,
style:
TextStyle
(
fontSize:
16
,
color:
_onChange
?
Colors
.
white
:
Colors
.
black87
,
color:
canSubmit
?
Colors
.
white
:
Colors
.
black87
,
fontWeight:
FontWeight
.
w700
,
),
),
...
...
@@ -169,9 +171,10 @@ class _InterestCard extends StatelessWidget {
Positioned
(
bottom:
10
,
left:
12
,
right:
12
,
child:
Text
(
title
,
maxLines:
2
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
const
TextStyle
(
color:
Colors
.
white
,
fontSize:
18
,
fontWeight:
FontWeight
.
w700
),
),
...
...
lib/features/main_tab_screen/main_tab_screen.dart
View file @
682ab1de
...
...
@@ -29,6 +29,13 @@ class _MainTabScreenState extends State<MainTabScreen> {
@override
void
initState
()
{
super
.
initState
();
final
args
=
Get
.
arguments
;
if
(
args
is
Map
)
{
final
requestedIndex
=
args
[
'tabIndex'
];
if
(
requestedIndex
is
int
&&
requestedIndex
>=
0
&&
requestedIndex
<
_pages
.
length
)
{
_currentIndex
=
requestedIndex
;
}
}
final
viewModel
=
Get
.
put
(
HeaderHomeViewModel
());
viewModel
.
freshData
();
}
...
...
lib/features/membership/member_level_header_widget.dart
View file @
682ab1de
...
...
@@ -46,24 +46,28 @@ class MemberLevelHeaderWidget extends StatelessWidget {
placeholderAsset:
"assets/images/ic_logo_rank_member.png"
,
),
const
SizedBox
(
width:
6
),
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
name
.
toUpperCase
(),
style:
const
TextStyle
(
fontSize:
22
,
fontWeight:
FontWeight
.
bold
,
color:
Colors
.
white
),
),
const
SizedBox
(
height:
4
),
if
((
level
?.
levelName
??
""
).
isNotEmpty
)
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
12
,
vertical:
4
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
)),
child:
Text
(
(
level
?.
levelName
??
""
).
capitalizeWords
(),
style:
TextStyle
(
color:
BaseColor
.
primary800
,
fontSize:
14
,
fontWeight:
FontWeight
.
bold
),
),
Expanded
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
name
.
toUpperCase
(),
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
const
TextStyle
(
fontSize:
22
,
fontWeight:
FontWeight
.
bold
,
color:
Colors
.
white
),
),
],
const
SizedBox
(
height:
4
),
if
((
level
?.
levelName
??
""
).
isNotEmpty
)
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
12
,
vertical:
4
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
)),
child:
Text
(
(
level
?.
levelName
??
""
).
capitalizeWords
(),
style:
TextStyle
(
color:
BaseColor
.
primary800
,
fontSize:
14
,
fontWeight:
FontWeight
.
bold
),
),
),
],
),
),
],
),
...
...
lib/features/news/news_list_screen.dart
View file @
682ab1de
...
...
@@ -65,6 +65,7 @@ class _NewsListScreenState extends State<NewsListScreen> {
);
}),
),
const
SizedBox
(
height:
16
),
],
),
);
...
...
lib/features/notification/notification_screen.dart
View file @
682ab1de
...
...
@@ -157,7 +157,7 @@ class _NotificationScreenState extends BaseState<NotificationScreen> with BasicS
void
_confirmDeleteAllNotifications
()
{
final
dataAlert
=
DataAlertModel
(
title:
"Xoá tất cả"
,
//
title: "Xoá tất cả",
description:
"Bạn có muốn xoá hết tất cả thông báo không?
\n
Lưu ý: bạn sẽ không thể xem lại thông báo đã xoá"
,
localHeaderImage:
"assets/images/ic_pipi_03.png"
,
buttons:
[
...
...
lib/features/notification/notification_viewmodel.dart
View file @
682ab1de
...
...
@@ -51,6 +51,7 @@ class NotificationViewModel extends RestfulApiViewModel {
onShowAlertError
?.
call
(
msg
);
},
onComplete:
()
{
isLoading
.
value
=
false
;
fetchNotifications
(
refresh:
true
);
},
);
...
...
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