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
417358c5
"...notification/models/notification_detail_model.g.dart" did not exist on "33ec1dde6c9e6a110ba69ad694051b58b970b13f"
Commit
417358c5
authored
Aug 15, 2025
by
DatHV
Browse files
update authen 401, device manager, interestied category
parent
efb4662c
Changes
99
Show whitespace changes
Inline
Side-by-side
lib/screen/affiliate/sub_widget/build_affiliate_category.dart
View file @
417358c5
import
'package:flutter/material.dart'
;
import
'../../../resouce/base_color.dart'
;
import
'../../../resou
r
ce
s
/base_color.dart'
;
import
'../model/affiliate_category_model.dart'
;
class
AffiliateCategory
extends
StatelessWidget
{
...
...
lib/screen/affiliate_brand_detail/affiliate_brand_detail_screen.dart
View file @
417358c5
...
...
@@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import
'package:mypoint_flutter_app/extensions/num_extension.dart'
;
import
'../../../base/base_screen.dart'
;
import
'../../../base/basic_state.dart'
;
import
'../../resouce/base_color.dart'
;
import
'../../resou
r
ce
s
/base_color.dart'
;
import
'../../widgets/back_button.dart'
;
import
'../../widgets/image_loader.dart'
;
import
'../../widgets/measure_size.dart'
;
...
...
lib/screen/affiliate_brand_detail/affiliate_category_grid_screen.dart
View file @
417358c5
import
'package:flutter/material.dart'
;
import
'package:get/get.dart'
;
import
'../../resouce/base_color.dart'
;
import
'../../resou
r
ce
s
/base_color.dart'
;
import
'../../widgets/custom_navigation_bar.dart'
;
import
'../affiliate/affiliate_popup_brands.dart'
;
import
'../affiliate/model/affiliate_category_model.dart'
;
...
...
lib/screen/biometric/biometric_screen.dart
View file @
417358c5
...
...
@@ -3,7 +3,7 @@ import 'package:get/get.dart';
import
'package:local_auth/local_auth.dart'
;
import
'../../base/base_screen.dart'
;
import
'../../base/basic_state.dart'
;
import
'../../resouce/base_color.dart'
;
import
'../../resou
r
ce
s
/base_color.dart'
;
import
'../../widgets/alert/data_alert_model.dart'
;
import
'../main_tab_screen/main_tab_screen.dart'
;
import
'biometric_viewmodel.dart'
;
...
...
lib/screen/campaign7day/campaign_7day_guide_dialog.dart
View file @
417358c5
import
'package:flutter/material.dart'
;
import
'package:flutter_widget_from_html/flutter_widget_from_html.dart'
;
import
'../../resouce/base_color.dart'
;
import
'../../resou
r
ce
s
/base_color.dart'
;
class
Campaign7DayGuideDialog
extends
StatelessWidget
{
final
String
title
;
...
...
lib/screen/campaign7day/campaign_7day_mission_info_dialog.dart
View file @
417358c5
import
'package:flutter/material.dart'
;
import
'package:flutter_widget_from_html/flutter_widget_from_html.dart'
;
import
'../../resouce/base_color.dart'
;
import
'../../resou
r
ce
s
/base_color.dart'
;
import
'models/campaign_7day_mission_model.dart'
;
class
Campaign7DayMissionInfoDialog
extends
StatelessWidget
{
...
...
lib/screen/campaign7day/campaign_7day_screen.dart
View file @
417358c5
...
...
@@ -3,7 +3,7 @@ import 'package:get/get.dart';
import
'package:mypoint_flutter_app/widgets/custom_empty_widget.dart'
;
import
'../../base/base_screen.dart'
;
import
'../../base/basic_state.dart'
;
import
'../../resouce/base_color.dart'
;
import
'../../resou
r
ce
s
/base_color.dart'
;
import
'../../widgets/bottom_sheet_helper.dart'
;
import
'../home/custom_widget/hover_view.dart'
;
import
'campaign_7day_guide_dialog.dart'
;
...
...
lib/screen/campaign7day/custom_widgets/campaign_7day_mission_card_item.dart
View file @
417358c5
import
'package:flutter/material.dart'
;
import
'package:mypoint_flutter_app/widgets/image_loader.dart'
;
import
'../../../resouce/base_color.dart'
;
import
'../../../resou
r
ce
s
/base_color.dart'
;
import
'../models/campaign_7day_mission_model.dart'
;
class
Campaign7DayMissionCardItem
extends
StatelessWidget
{
...
...
lib/screen/campaign7day/custom_widgets/campaign_7day_reward_item.dart
View file @
417358c5
import
'package:flutter/material.dart'
;
import
'package:flutter_widget_from_html/flutter_widget_from_html.dart'
;
import
'package:get/get.dart'
;
import
'../../../resouce/base_color.dart'
;
import
'../../../resou
r
ce
s
/base_color.dart'
;
import
'../models/campaign_7day_reward_model.dart'
;
class
Campaign7DayRewardItem
extends
StatelessWidget
{
...
...
lib/screen/campaign7day/models/campaign_7day_config_model.dart
View file @
417358c5
import
'dart:ui'
;
import
'package:json_annotation/json_annotation.dart'
;
import
'
package:mypoint_flutter_app
/resouce/base_color.dart'
;
import
'
../../..
/resou
r
ce
s
/base_color.dart'
;
part
'campaign_7day_config_model.g.dart'
;
@JsonSerializable
()
...
...
lib/screen/change_pass/change_pass_screen.dart
View file @
417358c5
...
...
@@ -4,7 +4,7 @@ import 'package:mypoint_flutter_app/widgets/alert/data_alert_model.dart';
import
'../../base/base_screen.dart'
;
import
'../../base/basic_state.dart'
;
import
'../../preference/data_preference.dart'
;
import
'../../resouce/base_color.dart'
;
import
'../../resou
r
ce
s
/base_color.dart'
;
import
'../../shared/router_gage.dart'
;
import
'../../widgets/back_button.dart'
;
import
'../../widgets/support_button.dart'
;
...
...
@@ -241,7 +241,7 @@ class _ChangePassScreenState extends BaseState<ChangePassScreen> with BasicState
final
phone
=
DataPreference
.
instance
.
phone
;
if
(
phone
!=
null
)
{
if
(!
found
)
{
Get
.
offAllNamed
(
loginScreen
,
arguments:
phone
);
Get
.
offAllNamed
(
loginScreen
,
arguments:
{
'
phone
'
:
phone
}
);
}
}
else
{
DataPreference
.
instance
.
clearData
();
...
...
lib/screen/contacts/contacts_list_screen.dart
View file @
417358c5
...
...
@@ -4,7 +4,7 @@ import 'package:get/get.dart';
import
'package:url_launcher/url_launcher.dart'
;
import
'../../../widgets/custom_empty_widget.dart'
;
import
'../../../widgets/custom_search_navigation_bar.dart'
;
import
'../../resouce/base_color.dart'
;
import
'../../resou
r
ce
s
/base_color.dart'
;
import
'../invite_friend_campaign/invite_friend_campaign_viewmodel.dart'
;
class
ContactsListScreen
extends
StatefulWidget
{
...
...
lib/screen/create_pass/create_pass_screen.dart
View file @
417358c5
...
...
@@ -2,9 +2,8 @@ import 'package:flutter/material.dart';
import
'package:flutter/services.dart'
;
import
'package:get/get.dart'
;
import
'package:mypoint_flutter_app/screen/create_pass/signup_create_password_repository.dart'
;
import
'package:mypoint_flutter_app/screen/onboarding/onboarding_screen.dart'
;
import
'package:mypoint_flutter_app/widgets/back_button.dart'
;
import
'../../resouce/base_color.dart'
;
import
'../../resou
r
ce
s
/base_color.dart'
;
import
'create_pass_viewmodel.dart'
;
class
CreatePasswordScreen
extends
StatelessWidget
{
...
...
lib/screen/create_pass/reset_create_password_repository.dart
View file @
417358c5
...
...
@@ -18,8 +18,7 @@ class ResetCreatePasswordRepository extends RestfulApiViewModel implements ICrea
return
client
.
accountPasswordReset
(
phoneNumber
,
password
).
then
((
value
)
{
hideLoading
();
if
(
value
.
status
==
"success"
||
value
.
code
==
200
)
{
print
(
"Reset password success"
);
Get
.
offNamed
(
loginScreen
,
arguments:
phoneNumber
);
Get
.
offNamed
(
loginScreen
,
arguments:
{
'phone'
:
phoneNumber
});
}
return
value
;
});
...
...
lib/screen/create_pass/signup_create_password_repository.dart
View file @
417358c5
...
...
@@ -43,7 +43,7 @@ class SignUpCreatePasswordRepository extends RestfulApiViewModel implements ICre
await
DataPreference
.
instance
.
saveLoginToken
(
response
.
data
!);
_getUserProfile
();
}
else
{
Get
.
offNamed
(
loginScreen
,
arguments:
phoneNumber
);
Get
.
offNamed
(
loginScreen
,
arguments:
{
'phone'
:
phoneNumber
}
);
}
});
}
...
...
@@ -62,7 +62,7 @@ class SignUpCreatePasswordRepository extends RestfulApiViewModel implements ICre
}
}
else
{
DataPreference
.
instance
.
clearLoginToken
();
Get
.
offNamed
(
loginScreen
,
arguments:
phoneNumber
);
Get
.
offNamed
(
loginScreen
,
arguments:
{
'phone'
:
phoneNumber
}
);
}
});
}
...
...
lib/screen/daily_checkin/daily_checkin_models.dart
View file @
417358c5
import
'package:mypoint_flutter_app/screen/quiz_campaign/quiz_campaign_screen.dart'
;
import
'../mobile_card/models/mobile_service_redeem_data.dart'
;
class
CheckInDataModel
{
final
String
?
campaignCode
;
final
List
<
Counter
>?
counters
;
Counter
?
get
dailyCounter
{
return
counters
?.
firstWhereOrNull
((
counter
)
=>
counter
.
counterName
==
'CUSTOMER_CHECKIN_DAILY_TFC'
);
}
Counter
?
get
currentCounter
{
return
counters
?.
firstWhereOrNull
((
counter
)
=>
counter
.
counterName
==
'CUSTOMER_CHECKIN_NE_TFC'
);
}
CheckInDataModel
({
this
.
campaignCode
,
this
.
counters
});
factory
CheckInDataModel
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
return
CheckInDataModel
(
campaignCode:
json
[
'campaign_code'
],
counters:
(
json
[
'counters'
]
as
List
?)
?.
map
((
e
)
=>
Counter
.
fromJson
(
e
))
.
toList
(),
counters:
(
json
[
'counters'
]
as
List
?)?.
map
((
e
)
=>
Counter
.
fromJson
(
e
)).
toList
(),
);
}
}
...
...
@@ -40,8 +47,7 @@ class Counter {
dynamic
parsedValues
;
if
(
rawValues
is
List
)
{
parsedValues
=
rawValues
.
map
((
e
)
=>
CounterValue
.
fromJson
(
e
as
Map
<
String
,
dynamic
>)).
toList
();
parsedValues
=
rawValues
.
map
((
e
)
=>
CounterValue
.
fromJson
(
e
as
Map
<
String
,
dynamic
>)).
toList
();
}
else
if
(
rawValues
is
Map
<
String
,
dynamic
>)
{
parsedValues
=
CounterValue
.
fromJson
(
rawValues
);
}
...
...
@@ -75,27 +81,17 @@ class SubmitCheckInData {
final
String
?
message
;
final
CustomerBalance
?
customerBalance
;
SubmitCheckInData
({
this
.
reward
,
this
.
message
,
this
.
customerBalance
,
});
SubmitCheckInData
({
this
.
reward
,
this
.
message
,
this
.
customerBalance
});
factory
SubmitCheckInData
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
return
SubmitCheckInData
(
reward:
json
[
'reward'
]
as
String
?,
message:
json
[
'message'
]
as
String
?,
customerBalance:
json
[
'customer_balance'
]
!=
null
?
CustomerBalance
.
fromJson
(
json
[
'customer_balance'
])
:
null
,
customerBalance:
json
[
'customer_balance'
]
!=
null
?
CustomerBalance
.
fromJson
(
json
[
'customer_balance'
])
:
null
,
);
}
Map
<
String
,
dynamic
>
toJson
()
{
return
{
'reward'
:
reward
,
'message'
:
message
,
'customer_balance'
:
customerBalance
?.
toJson
(),
};
return
{
'reward'
:
reward
,
'message'
:
message
,
'customer_balance'
:
customerBalance
?.
toJson
()};
}
}
lib/screen/daily_checkin/daily_checkin_screen.dart
View file @
417358c5
import
'dart:ffi'
;
import
'package:flutter/material.dart'
;
import
'package:get/get.dart'
;
import
'package:mypoint_flutter_app/screen/daily_checkin/daily_checkin_models.dart'
;
import
'../../base/base_screen.dart'
;
import
'../../base/basic_state.dart'
;
import
'../../preference/point/point_manager.dart'
;
import
'../../resouce/base_color.dart'
;
import
'../../resou
r
ce
s
/base_color.dart'
;
import
'../../widgets/custom_navigation_bar.dart'
;
import
'daily_checkin_viewmodel.dart'
;
...
...
@@ -38,8 +40,6 @@ class _DailyCheckInScreenState extends BaseState<DailyCheckInScreen> with BasicS
return
Scaffold
(
appBar:
CustomNavigationBar
(
title:
"Check-in nhận quà"
),
body:
Obx
(()
{
print
(
"_viewModel_viewModel
${_viewModel.submitData.value?.customerBalance?.amountActive}
"
);
print
(
UserPointManager
().
point
.
toString
());
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
...
...
@@ -94,36 +94,32 @@ class _DailyCheckInScreenState extends BaseState<DailyCheckInScreen> with BasicS
}
Widget
_buildCheckInList
()
{
final
counter
=
_viewModel
.
checkInData
.
value
?.
counters
?.
first
;
final
items
=
counter
?.
values
??
[];
final
days
=
List
.
generate
(
items
.
length
,
(
index
)
{
var
item
=
items
[
index
];
final
dailyCounters
=
_viewModel
.
checkInData
.
value
?.
dailyCounter
?.
values
??
[];
final
current
=
_viewModel
.
checkInData
.
value
?.
currentCounter
?.
values
?.
firstOrNull
;
final
checkedCounter
=
int
.
tryParse
(
current
?.
counterValue
??
''
)
??
0
;
final
days
=
List
.
generate
(
dailyCounters
.
length
,
(
index
)
{
final
isChecked
=
index
<
checkedCounter
;
var
item
=
dailyCounters
[
index
];
String
label
;
String
point
=
'+
${item.pointReward?.toString() ?? '0'}
'
;
bool
isToday
=
index
==
0
;
if
(
index
==
0
)
{
label
=
'Hôm nay'
;
}
else
if
(
index
==
items
.
length
-
1
)
{
label
=
'Ngày 7'
;
}
else
{
bool
isToday
=
index
==
(
checkedCounter
-
(
_viewModel
.
todayIsChecked
?
1
:
0
));
label
=
'Ngày
${index + 1}
'
;
if
(
isToday
)
{
label
=
'Hôm nay'
;
}
return
Column
(
children:
[
Row
(
children:
[
SizedBox
(
width:
1
6
,
width:
1
2
,
child:
Divider
(
color:
index
==
0
?
Colors
.
transparent
:
Colors
.
grey
.
shade300
,
thickness:
4
),
),
is
Today
?
Image
.
asset
(
'assets/images/ic_check_in_success.png'
,
width:
2
4
,
fit:
BoxFit
.
cover
)
:
Image
.
asset
(
'assets/images/ic_point.png'
,
width:
2
4
,
fit:
BoxFit
.
cover
),
is
Checked
?
Image
.
asset
(
'assets/images/ic_check_in_success.png'
,
width:
3
2
,
fit:
BoxFit
.
cover
)
:
Image
.
asset
(
'assets/images/ic_point.png'
,
width:
3
2
,
fit:
BoxFit
.
cover
),
SizedBox
(
width:
1
6
,
width:
1
2
,
child:
Divider
(
color:
index
==
6
?
Colors
.
transparent
:
Colors
.
grey
.
shade300
,
thickness:
4
),
),
],
...
...
@@ -133,8 +129,8 @@ class _DailyCheckInScreenState extends BaseState<DailyCheckInScreen> with BasicS
label
,
style:
TextStyle
(
fontSize:
12
,
color:
is
Today
?
Colors
.
orange
:
Colors
.
black54
,
fontWeight:
is
Today
?
FontWeight
.
bold
:
FontWeight
.
normal
,
color:
is
Checked
?
Colors
.
orange
:
Colors
.
black54
,
fontWeight:
is
Checked
?
FontWeight
.
bold
:
FontWeight
.
normal
,
),
),
const
SizedBox
(
height:
2
),
...
...
@@ -142,7 +138,7 @@ class _DailyCheckInScreenState extends BaseState<DailyCheckInScreen> with BasicS
point
,
style:
TextStyle
(
fontSize:
13
,
color:
is
Today
?
Colors
.
orange
:
Colors
.
black87
,
color:
is
Checked
?
Colors
.
orange
:
Colors
.
black87
,
fontWeight:
FontWeight
.
bold
,
),
),
...
...
lib/screen/daily_checkin/daily_checkin_viewmodel.dart
View file @
417358c5
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
'../../preference/point/point_manager.dart'
;
import
'daily_checkin_models.dart'
;
class
DailyCheckInViewModel
extends
RestfulApiViewModel
{
...
...
@@ -42,6 +41,7 @@ class DailyCheckInViewModel extends RestfulApiViewModel {
hideLoading
();
submitData
.
value
=
response
.
data
;
submitDataResponse
?.
call
(
response
.
data
);
_rewardOpportunityGetList
();
}
catch
(
error
)
{
hideLoading
();
onShowAlertError
?.
call
(
"Error fetching product detail:
$error
"
);
...
...
lib/screen/data_network_service/data_network_service_screen.dart
View file @
417358c5
...
...
@@ -10,7 +10,7 @@ import '../../base/base_screen.dart';
import
'../../base/basic_state.dart'
;
import
'../../preference/data_preference.dart'
;
import
'../../preference/point/point_manager.dart'
;
import
'../../resouce/base_color.dart'
;
import
'../../resou
r
ce
s
/base_color.dart'
;
import
'../../widgets/alert/custom_alert_dialog.dart'
;
import
'../../widgets/alert/data_alert_model.dart'
;
import
'../topup/brand_select_sheet_widget.dart'
;
...
...
lib/screen/delete_account/delete_account_dialog.dart
View file @
417358c5
...
...
@@ -4,8 +4,8 @@ import 'package:flutter/gestures.dart';
import
'package:get/get.dart'
;
import
'package:mypoint_flutter_app/preference/data_preference.dart'
;
import
'../../preference/point/point_manager.dart'
;
import
'../../resouce/button_style.dart'
;
import
'../../resouce/text_style.dart'
;
import
'../../resou
r
ce
s
/button_style.dart'
;
import
'../../resou
r
ce
s
/text_style.dart'
;
import
'../../shared/router_gage.dart'
;
import
'../pageDetail/campaign_detail_screen.dart'
;
import
'../pageDetail/model/detail_page_rule_type.dart'
;
...
...
Prev
1
2
3
4
5
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