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
55151ba2
Commit
55151ba2
authored
Sep 05, 2025
by
DatHV
Browse files
update history point, manager
parent
f714cdcc
Changes
130
Hide whitespace changes
Inline
Side-by-side
lib/screen/quiz_campaign/quiz_campaign_viewmodel.dart
View file @
55151ba2
import
'package:get/get_rx/src/rx_types/rx_types.dart'
;
import
'package:mypoint_flutter_app/configs/constants.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_request.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_
client_all_
request.dart'
;
import
'package:mypoint_flutter_app/screen/quiz_campaign/quiz_campaign_model.dart'
;
import
'../../
base
/restful_api_viewmodel.dart'
;
import
'../../
networking
/restful_api_viewmodel.dart'
;
import
'../../widgets/alert/popup_data_model.dart'
;
class
QuizCampaignViewModel
extends
RestfulApiViewModel
{
...
...
lib/screen/register_campaign/register_form_input_viewmodel.dart
View file @
55151ba2
import
'package:get/get_rx/src/rx_types/rx_types.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_request.dart'
;
import
'../../
base
/restful_api_viewmodel.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_
client_all_
request.dart'
;
import
'../../
networking
/restful_api_viewmodel.dart'
;
import
'model/registration_form_package_model.dart'
;
class
RegisterFormInputViewModel
extends
RestfulApiViewModel
{
...
...
lib/screen/setting/setting_viewmodel.dart
View file @
55151ba2
import
'package:mypoint_flutter_app/networking/restful_api_request.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_
client_all_
request.dart'
;
import
'../../
base
/restful_api_viewmodel.dart'
;
import
'../../
networking
/restful_api_viewmodel.dart'
;
import
'../../permission/biometric_manager.dart'
;
import
'../../preference/data_preference.dart'
;
...
...
lib/model/check_update_response_model.dart
→
lib/
screen/splash/
model
s
/check_update_response_model.dart
View file @
55151ba2
File moved
lib/model/check_update_response_model.g.dart
→
lib/
screen/splash/
model
s
/check_update_response_model.g.dart
View file @
55151ba2
File moved
lib/model/update_response_model.dart
→
lib/
screen/splash/
model
s
/update_response_model.dart
View file @
55151ba2
import
'package:json_annotation/json_annotation.dart'
;
import
'package:mypoint_flutter_app/model/check_update_response_model.dart'
;
import
'package:mypoint_flutter_app/
screen/splash/
model
s
/check_update_response_model.dart'
;
part
'update_response_model.g.dart'
;
...
...
lib/model/update_response_model.g.dart
→
lib/
screen/splash/
model
s
/update_response_model.g.dart
View file @
55151ba2
File moved
lib/screen/splash/splash_screen.dart
View file @
55151ba2
...
...
@@ -2,18 +2,14 @@ import 'dart:io';
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:get/get.dart'
;
import
'package:mypoint_flutter_app/configs/api_paths.dart'
;
import
'package:mypoint_flutter_app/dio_http_service/api_helper.dart'
;
import
'package:mypoint_flutter_app/screen/splash/splash_screen_viewmodel.dart'
;
import
'package:mypoint_flutter_app/shared/router_gage.dart'
;
import
'package:mypoint_flutter_app/widgets/alert/custom_alert_dialog.dart'
;
import
'../../base/base_screen.dart'
;
import
'../../base/basic_state.dart'
;
import
'
../../
model/check_update_response_model.dart'
;
import
'model
s
/check_update_response_model.dart'
;
import
'../../resources/base_color.dart'
;
import
'../../widgets/alert/data_alert_model.dart'
;
import
'../onboarding/onboarding_screen.dart'
;
class
SplashScreen
extends
BaseScreen
{
const
SplashScreen
({
super
.
key
});
...
...
@@ -22,13 +18,12 @@ class SplashScreen extends BaseScreen {
State
<
SplashScreen
>
createState
()
=>
_SplashScreenState
();
}
class
_SplashScreenState
extends
BaseState
<
SplashScreen
>
with
BasicState
,
ApiHelper
{
class
_SplashScreenState
extends
BaseState
<
SplashScreen
>
with
BasicState
{
final
SplashScreenViewModel
_viewModel
=
Get
.
put
(
SplashScreenViewModel
());
@override
void
initState
()
{
super
.
initState
();
initNetWork
(
APIPaths
.
baseUrl
);
_viewModel
.
checkUpdateApp
();
_viewModel
.
infoAppUpdate
.
listen
((
response
)
{
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
...
...
@@ -39,10 +34,10 @@ class _SplashScreenState extends BaseState<SplashScreen> with BasicState, ApiHel
}
var
result
=
response
?.
data
?.
updateRequest
?.
first
;
var
status
=
result
?.
status
??
UpdateStatus
.
none
;
if
(
result
==
null
&&
status
==
UpdateStatus
.
none
)
{
if
(
result
==
null
||
status
==
UpdateStatus
.
none
)
{
_navigateToBeforCheckUpdate
();
}
else
{
_showSuggestUpdateAlert
(
result
!
);
_showSuggestUpdateAlert
(
result
);
}
});
});
...
...
@@ -83,7 +78,7 @@ class _SplashScreenState extends BaseState<SplashScreen> with BasicState, ApiHel
}
void
_navigateToBeforCheckUpdate
()
{
Get
.
t
oNamed
(
onboardingScreen
);
Get
.
o
ffAll
Named
(
onboardingScreen
);
}
void
_showSuggestUpdateAlert
(
CheckUpdateResponseModel
data
)
{
...
...
lib/screen/splash/splash_screen_viewmodel.dart
View file @
55151ba2
import
'package:flutter/cupertino.dart'
;
import
'package:get/get.dart'
;
import
'package:mypoint_flutter_app/
base
/restful_api_viewmodel.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_request.dart'
;
import
'package:mypoint_flutter_app/
networking
/restful_api_viewmodel.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_
client_all_
request.dart'
;
import
'package:mypoint_flutter_app/shared/router_gage.dart'
;
import
'../../base/base_response_model.dart'
;
import
'../../model/auth/profile_response_model.dart'
;
import
'
../../
model/update_response_model.dart'
;
import
'model
s
/update_response_model.dart'
;
import
'../../preference/data_preference.dart'
;
import
'../../preference/point/point_manager.dart'
;
import
'package:url_launcher/url_launcher.dart'
;
...
...
lib/screen/topup/topup_viewmodel.dart
View file @
55151ba2
import
'package:get/get.dart'
;
import
'package:get/get_rx/src/rx_types/rx_types.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_request.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_
client_all_
request.dart'
;
import
'package:mypoint_flutter_app/preference/data_preference.dart'
;
import
'../../
base
/restful_api_viewmodel.dart'
;
import
'../../
networking
/restful_api_viewmodel.dart'
;
import
'../../preference/contact_storage_service.dart'
;
import
'../voucher/models/product_brand_model.dart'
;
import
'../voucher/models/product_model.dart'
;
...
...
lib/screen/traffic_service/traffic_service_viewmodel.dart
View file @
55151ba2
import
'package:get/get_rx/src/rx_types/rx_types.dart'
;
import
'package:mypoint_flutter_app/configs/constants.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_request.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_
client_all_
request.dart'
;
import
'package:mypoint_flutter_app/screen/traffic_service/traffic_service_model.dart'
;
import
'../../
base
/restful_api_viewmodel.dart'
;
import
'../../
networking
/restful_api_viewmodel.dart'
;
class
TrafficServiceViewModel
extends
RestfulApiViewModel
{
var
trafficData
=
Rxn
<
TrafficServiceResponseModel
>();
...
...
lib/screen/transaction/history/transaction_history_detail_screen.dart
View file @
55151ba2
...
...
@@ -8,6 +8,8 @@ import '../../../base/base_screen.dart';
import
'../../../base/basic_state.dart'
;
import
'../../../resources/base_color.dart'
;
import
'../../../widgets/back_button.dart'
;
import
'../../../widgets/custom_navigation_bar.dart'
;
import
'../../../widgets/custom_toast_message.dart'
;
import
'../../../widgets/image_loader.dart'
;
import
'transaction_history_detail_viewmodel.dart'
;
import
'transaction_history_model.dart'
;
...
...
@@ -41,21 +43,14 @@ class _TransactionHistoryDetailScreenState extends BaseState<TransactionHistoryD
Widget
createBody
()
{
return
Scaffold
(
backgroundColor:
Colors
.
grey
.
shade100
,
appBar:
AppBar
(
backgroundColor:
Colors
.
white
,
elevation:
0
,
centerTitle:
true
,
title:
const
Text
(
'Chi tiết giao dịch'
,
style:
TextStyle
(
fontSize:
18
,
fontWeight:
FontWeight
.
bold
,
color:
Colors
.
black87
),
),
leading:
canBack
?
CustomBackButton
()
:
SizedBox
.
shrink
(),
actions:
[
appBar:
CustomNavigationBar
(
title:
'Chi tiết giao dịch'
,
leftButtons:
canBack
?
[
CustomBackButton
()]
:
[],
rightButtons:
[
IconButton
(
icon:
const
Icon
(
Icons
.
headset_mic
,
size:
24
,
color:
Colors
.
black
),
icon:
const
Icon
(
Icons
.
headset_mic
,
size:
24
,
color:
Colors
.
black
54
),
onPressed:
()
{
Get
.
toNamed
(
supportScreen
);
// Xử lý khi nhấn nút hỗ trợ
},
),
],
...
...
@@ -172,7 +167,7 @@ class _TransactionHistoryDetailScreenState extends BaseState<TransactionHistoryD
icon:
const
Icon
(
Icons
.
copy
,
size:
16
,
color:
BaseColor
.
primary500
),
onPressed:
()
{
Clipboard
.
setData
(
ClipboardData
(
text:
data
.
transactionId
??
''
));
Get
.
snackbar
(
'✔️'
,
'Đã sao chép mã giao dịch'
);
showToastMessage
(
'Đã sao chép mã giao dịch'
);
},
),
),
...
...
lib/screen/transaction/history/transaction_history_detail_viewmodel.dart
View file @
55151ba2
import
'package:get/get_rx/src/rx_types/rx_types.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_request.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_
client_all_
request.dart'
;
import
'package:mypoint_flutter_app/screen/transaction/history/transaction_history_model.dart'
;
import
'../../../
base
/restful_api_viewmodel.dart'
;
import
'../../../
networking
/restful_api_viewmodel.dart'
;
import
'../../../configs/constants.dart'
;
class
TransactionHistoryDetailViewModel
extends
RestfulApiViewModel
{
...
...
lib/screen/transaction/transaction_detail_viewmodel.dart
View file @
55151ba2
import
'package:get/get.dart'
;
import
'package:get/get_core/src/get_main.dart'
;
import
'package:get/get_rx/src/rx_types/rx_types.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_request.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_
client_all_
request.dart'
;
import
'package:mypoint_flutter_app/shared/router_gage.dart'
;
import
'package:uuid/uuid.dart'
;
import
'../../
base
/restful_api_viewmodel.dart'
;
import
'../../
networking
/restful_api_viewmodel.dart'
;
import
'../../configs/constants.dart'
;
import
'../../preference/contact_storage_service.dart'
;
import
'../../preference/data_preference.dart'
;
...
...
lib/screen/transaction/transactions_history_viewmodel.dart
View file @
55151ba2
import
'package:get/get_rx/src/rx_types/rx_types.dart'
;
import
'package:mypoint_flutter_app/extensions/datetime_extensions.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_request.dart'
;
import
'../../
base
/restful_api_viewmodel.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_
client_all_
request.dart'
;
import
'../../
networking
/restful_api_viewmodel.dart'
;
import
'history/transaction_category_model.dart'
;
import
'history/transaction_history_response_model.dart'
;
...
...
lib/screen/voucher/detail/voucher_detail_viewmodel.dart
View file @
55151ba2
import
'dart:ui'
;
import
'package:get/get.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_request.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_
client_all_
request.dart'
;
import
'package:uuid/uuid.dart'
;
import
'../../../
base
/restful_api_viewmodel.dart'
;
import
'../../../
networking
/restful_api_viewmodel.dart'
;
import
'../../../configs/constants.dart'
;
import
'../../../shared/router_gage.dart'
;
import
'../models/product_model.dart'
;
...
...
lib/screen/voucher/my_voucher/my_mobile_card_list_viewmodel.dart
View file @
55151ba2
import
'package:get/get_rx/src/rx_types/rx_types.dart'
;
import
'package:mypoint_flutter_app/configs/constants.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_request.dart'
;
import
'../../../
base
/restful_api_viewmodel.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_
client_all_
request.dart'
;
import
'../../../
networking
/restful_api_viewmodel.dart'
;
import
'../../mobile_card/models/product_mobile_card_model.dart'
;
import
'../models/my_product_status_type.dart'
;
...
...
lib/screen/voucher/my_voucher/my_product_list_viewmodel.dart
View file @
55151ba2
import
'package:get/get_rx/src/rx_types/rx_types.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_request.dart'
;
import
'../../../
base
/restful_api_viewmodel.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api
_client
.dart'
;
import
'package:mypoint_flutter_app/networking/restful_api_
client_all_
request.dart'
;
import
'../../../
networking
/restful_api_viewmodel.dart'
;
import
'../../home/models/my_product_model.dart'
;
class
MyProductListViewModel
extends
RestfulApiViewModel
{
...
...
lib/screen/voucher/sub_widget/voucher_item_grid.dart
View file @
55151ba2
...
...
@@ -167,7 +167,7 @@ class _VoucherGridItem extends StatelessWidget {
overflow:
TextOverflow
.
ellipsis
,
),
),
PriceTagWidget
(
point:
product
.
amountToBePaid
??
0
,),
PriceTagWidget
(
point:
product
.
amountToBePaid
??
0
,
type:
product
.
price
?.
method
),
],
),
],
...
...
lib/screen/voucher/sub_widget/voucher_item_list.dart
View file @
55151ba2
...
...
@@ -120,7 +120,7 @@ class VoucherListItem extends StatelessWidget {
],
),
const
SizedBox
(
height:
8
),
PriceTagWidget
(
point:
product
.
amountToBePaid
??
0
,),
PriceTagWidget
(
point:
product
.
amountToBePaid
??
0
,
type:
product
.
price
?.
method
,
),
],
),
),
...
...
Prev
1
2
3
4
5
6
7
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