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
2cf5375a
Commit
2cf5375a
authored
Nov 20, 2025
by
DatHV
Browse files
update navigation padding
parent
b3c72190
Changes
25
Hide whitespace changes
Inline
Side-by-side
lib/app/config/constants.dart
View file @
2cf5375a
import
'package:flutter/foundation.dart'
;
class
Constants
{
class
Constants
{
static
String
get
commonError
=>
"Hệ thống không thể xử lý yêu cầu hiện tại. Vui lòng thử lại sau hoặc liên hệ hotline 1900599863 để được trợ giúp."
;
static
String
get
commonError
=>
"Hệ thống không thể xử lý yêu cầu hiện tại. Vui lòng thử lại sau hoặc liên hệ hotline 1900599863 để được trợ giúp."
;
...
@@ -6,7 +7,10 @@ class Constants {
...
@@ -6,7 +7,10 @@ class Constants {
static
var
phoneNumberCount
=
10
;
static
var
phoneNumberCount
=
10
;
static
const
timeoutSeconds
=
30
;
static
const
timeoutSeconds
=
30
;
static
const
appStoreId
=
'1495923300'
;
static
const
appStoreId
=
'1495923300'
;
static
const
double
webTopPadding
=
24.0
;
static
double
get
extendTopPaddingNavigation
{
print
(
'extendTopPaddingNavigation:
$kIsWeb
'
);
return
kIsWeb
?
24.0
:
0.0
;
}
}
}
class
ErrorCodes
{
class
ErrorCodes
{
...
...
lib/core/firebase/push_notification.dart
View file @
2cf5375a
...
@@ -85,7 +85,6 @@ class PushNotification {
...
@@ -85,7 +85,6 @@ class PushNotification {
'body'
:
body
,
'body'
:
body
,
};
};
return
screen
;
return
screen
;
// TODO handel title + body
}
}
// ===== Helpers =====
// ===== Helpers =====
...
...
lib/core/network/restful_api_client_all_request.dart
View file @
2cf5375a
...
@@ -191,7 +191,7 @@ extension RestfulAPIClientAllRequest on RestfulAPIClient {
...
@@ -191,7 +191,7 @@ extension RestfulAPIClientAllRequest on RestfulAPIClient {
"owner_id"
:
ownerId
,
"owner_id"
:
ownerId
,
"otp"
:
otp
,
"otp"
:
otp
,
"next_event_name"
:
nextEventName
,
"next_event_name"
:
nextEventName
,
"ttdne"
:
180
,
// TODO
"ttdne"
:
180
,
"ttl"
:
Constants
.
otpTtl
,
"resend_after_second"
:
Constants
.
otpTtl
,
"ttl"
:
Constants
.
otpTtl
,
"resend_after_second"
:
Constants
.
otpTtl
,
};
};
return
requestNormal
(
return
requestNormal
(
...
...
lib/features/affiliate_brand_detail/affiliate_brand_detail_screen.dart
View file @
2cf5375a
import
'dart:math'
;
import
'dart:math'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:mypoint_flutter_app/core/utils/extensions/num_extension.dart'
;
import
'package:mypoint_flutter_app/core/utils/extensions/num_extension.dart'
;
import
'../../app/config/constants.dart'
;
import
'../../shared/widgets/base_view/base_screen.dart'
;
import
'../../shared/widgets/base_view/base_screen.dart'
;
import
'../../shared/widgets/base_view/basic_state.dart'
;
import
'../../shared/widgets/base_view/basic_state.dart'
;
import
'../../core/theme/base_color.dart'
;
import
'../../core/theme/base_color.dart'
;
...
@@ -98,7 +99,7 @@ class _AffiliateBrandDetailScreenState extends BaseState<AffiliateBrandDetailScr
...
@@ -98,7 +99,7 @@ class _AffiliateBrandDetailScreenState extends BaseState<AffiliateBrandDetailScr
],
],
),
),
),
),
SafeArea
(
child:
Padding
(
padding:
const
EdgeInsets
.
only
(
left:
12
),
child:
CustomBackButton
())),
SafeArea
(
child:
Padding
(
padding:
EdgeInsets
.
only
(
left:
12
,
top:
Constants
.
extendTopPaddingNavigation
),
child:
CustomBackButton
())),
],
],
);
);
}),
}),
...
...
lib/features/campaign7day/campaign_7day_screen.dart
View file @
2cf5375a
...
@@ -32,8 +32,8 @@ class _Campaign7DayScreenState extends BaseState<Campaign7DayScreen> with BasicS
...
@@ -32,8 +32,8 @@ class _Campaign7DayScreenState extends BaseState<Campaign7DayScreen> with BasicS
super
.
initState
();
super
.
initState
();
String
?
campaignId
;
String
?
campaignId
;
final
args
=
Get
.
arguments
;
final
args
=
Get
.
arguments
;
if
(
args
is
String
)
{
if
(
args
is
Map
)
{
campaignId
=
args
;
campaignId
=
args
[
'id'
]
;
}
}
if
(
campaignId
.
orEmpty
.
isEmpty
)
{
if
(
campaignId
.
orEmpty
.
isEmpty
)
{
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
...
...
lib/features/campaign7day/custom_widgets/campaign_7day_top_buttons.dart
View file @
2cf5375a
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'../../../app/config/constants.dart'
;
class
Campaign7dayTopButtons
extends
StatelessWidget
{
class
Campaign7dayTopButtons
extends
StatelessWidget
{
final
VoidCallback
?
onBack
;
final
VoidCallback
?
onBack
;
final
VoidCallback
?
onInfo
;
final
VoidCallback
?
onInfo
;
...
@@ -16,7 +18,7 @@ class Campaign7dayTopButtons extends StatelessWidget {
...
@@ -16,7 +18,7 @@ class Campaign7dayTopButtons extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
SafeArea
(
return
SafeArea
(
child:
Padding
(
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
16.0
,
vertical:
8
),
padding:
EdgeInsets
.
only
(
left:
16
,
right:
16
,
bottom:
8
,
top:
8
+
Constants
.
extendTopPaddingNavigation
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
children:
[
...
...
lib/features/change_pass/change_pass_screen.dart
View file @
2cf5375a
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:get/get.dart'
;
import
'package:get/get.dart'
;
import
'package:mypoint_flutter_app/shared/widgets/alert/data_alert_model.dart'
;
import
'package:mypoint_flutter_app/shared/widgets/alert/data_alert_model.dart'
;
import
'../../shared/widgets/back_button.dart'
;
import
'../../shared/widgets/base_view/base_screen.dart'
;
import
'../../shared/widgets/base_view/base_screen.dart'
;
import
'../../shared/widgets/base_view/basic_state.dart'
;
import
'../../shared/widgets/base_view/basic_state.dart'
;
import
'../../shared/preferences/data_preference.dart'
;
import
'../../shared/preferences/data_preference.dart'
;
import
'../../core/theme/base_color.dart'
;
import
'../../core/theme/base_color.dart'
;
import
'../../shared/router_gage.dart'
;
import
'../../shared/router_gage.dart'
;
import
'../../shared/widgets/
back_button
.dart'
;
import
'../../shared/widgets/
custom_navigation_bar
.dart'
;
import
'../../shared/widgets/support_button.dart'
;
import
'../../shared/widgets/support_button.dart'
;
import
'../login/login_viewmodel.dart'
;
import
'../login/login_viewmodel.dart'
;
import
'change_pass_viewmodel.dart'
;
import
'change_pass_viewmodel.dart'
;
...
@@ -49,12 +50,11 @@ class _ChangePassScreenState extends BaseState<ChangePassScreen> with BasicState
...
@@ -49,12 +50,11 @@ class _ChangePassScreenState extends BaseState<ChangePassScreen> with BasicState
onTap:
hideKeyboard
,
onTap:
hideKeyboard
,
child:
Scaffold
(
child:
Scaffold
(
resizeToAvoidBottomInset:
false
,
resizeToAvoidBottomInset:
false
,
appBar:
AppBar
(
appBar:
CustomNavigationBar
(
automaticallyImplyLeading:
false
,
title:
''
,
backgroundColor:
Colors
.
white
,
backgroundImage:
''
,
centerTitle:
true
,
leftButtons:
[
CustomBackButton
()],
leading:
CustomBackButton
(),
rightButtons:
[
SupportButton
()],
actions:
[
SupportButton
()],
),
),
backgroundColor:
Colors
.
white
,
backgroundColor:
Colors
.
white
,
body:
SafeArea
(
body:
SafeArea
(
...
@@ -95,10 +95,7 @@ class _ChangePassScreenState extends BaseState<ChangePassScreen> with BasicState
...
@@ -95,10 +95,7 @@ class _ChangePassScreenState extends BaseState<ChangePassScreen> with BasicState
style:
const
TextStyle
(
fontSize:
14
,
color:
BaseColor
.
second500
),
style:
const
TextStyle
(
fontSize:
14
,
color:
BaseColor
.
second500
),
children:
[
children:
[
const
TextSpan
(
text:
"Nhập mật khẩu đăng nhập cho tài khoản "
),
const
TextSpan
(
text:
"Nhập mật khẩu đăng nhập cho tài khoản "
),
TextSpan
(
TextSpan
(
text:
_phone
,
style:
const
TextStyle
(
fontWeight:
FontWeight
.
w500
,
color:
BaseColor
.
primary500
)),
text:
_phone
,
style:
const
TextStyle
(
fontWeight:
FontWeight
.
w500
,
color:
BaseColor
.
primary500
),
),
],
],
),
),
);
);
...
@@ -165,21 +162,23 @@ class _ChangePassScreenState extends BaseState<ChangePassScreen> with BasicState
...
@@ -165,21 +162,23 @@ class _ChangePassScreenState extends BaseState<ChangePassScreen> with BasicState
title:
"Quên mật khẩu"
,
title:
"Quên mật khẩu"
,
description:
"Bạn cần đăng xuất khỏi tài khoản này để đặt lại mật khẩu. Bạn chắc chứ?."
,
description:
"Bạn cần đăng xuất khỏi tài khoản này để đặt lại mật khẩu. Bạn chắc chứ?."
,
localHeaderImage:
"assets/images/ic_pipi_03.png"
,
localHeaderImage:
"assets/images/ic_pipi_03.png"
,
buttons:
[
AlertButton
(
buttons:
[
text:
"Đồng ý"
,
AlertButton
(
onPressed:
()
async
{
text:
"Đồng ý"
,
await
DataPreference
.
instance
.
clearLoginToken
();
onPressed:
()
async
{
await
_safeBackToLogin
();
await
DataPreference
.
instance
.
clearLoginToken
();
},
await
_safeBackToLogin
();
bgColor:
BaseColor
.
primary500
,
},
textColor:
Colors
.
white
,
bgColor:
BaseColor
.
primary500
,
),
textColor:
Colors
.
white
,
),
AlertButton
(
AlertButton
(
text:
"Huỷ"
,
text:
"Huỷ"
,
onPressed:
()
=>
Get
.
back
(),
onPressed:
()
=>
Get
.
back
(),
bgColor:
Colors
.
white
,
bgColor:
Colors
.
white
,
textColor:
BaseColor
.
second500
,
textColor:
BaseColor
.
second500
,
),],
),
],
);
);
showAlert
(
data:
dataAlert
);
showAlert
(
data:
dataAlert
);
},
},
...
@@ -205,8 +204,8 @@ class _ChangePassScreenState extends BaseState<ChangePassScreen> with BasicState
...
@@ -205,8 +204,8 @@ class _ChangePassScreenState extends BaseState<ChangePassScreen> with BasicState
break
;
break
;
case
LoginState
.
error
:
case
LoginState
.
error
:
case
LoginState
.
idle
:
case
LoginState
.
idle
:
enabled
=
false
;
enabled
=
false
;
color
=
BaseColor
.
second400
;
color
=
BaseColor
.
second400
;
break
;
break
;
}
}
...
...
lib/features/create_pass/create_pass_screen.dart
View file @
2cf5375a
...
@@ -3,6 +3,7 @@ import 'package:flutter/services.dart';
...
@@ -3,6 +3,7 @@ import 'package:flutter/services.dart';
import
'package:get/get.dart'
;
import
'package:get/get.dart'
;
import
'package:mypoint_flutter_app/features/create_pass/signup_create_password_repository.dart'
;
import
'package:mypoint_flutter_app/features/create_pass/signup_create_password_repository.dart'
;
import
'package:mypoint_flutter_app/shared/widgets/back_button.dart'
;
import
'package:mypoint_flutter_app/shared/widgets/back_button.dart'
;
import
'../../app/config/constants.dart'
;
import
'../../core/theme/base_color.dart'
;
import
'../../core/theme/base_color.dart'
;
import
'create_pass_viewmodel.dart'
;
import
'create_pass_viewmodel.dart'
;
...
@@ -16,19 +17,16 @@ class CreatePasswordScreen extends StatelessWidget {
...
@@ -16,19 +17,16 @@ class CreatePasswordScreen extends StatelessWidget {
final
vm
=
Get
.
put
(
CreatePasswordViewModel
(
repository
));
final
vm
=
Get
.
put
(
CreatePasswordViewModel
(
repository
));
final
isNewPassObscure
=
true
.
obs
;
final
isNewPassObscure
=
true
.
obs
;
final
isConfirmPassObscure
=
true
.
obs
;
final
isConfirmPassObscure
=
true
.
obs
;
final
topExpand
=
MediaQuery
.
of
(
context
).
padding
.
top
+
8
+
Constants
.
extendTopPaddingNavigation
;
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
centerTitle:
true
,
leading:
CustomBackButton
(),
),
body:
SafeArea
(
body:
SafeArea
(
child:
Stack
(
child:
Stack
(
children:
[
children:
[
GestureDetector
(
GestureDetector
(
onTap:
()
=>
FocusScope
.
of
(
context
).
unfocus
(),
onTap:
()
=>
FocusScope
.
of
(
context
).
unfocus
(),
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
padding:
const
EdgeInsets
.
all
(
16
),
padding:
EdgeInsets
.
only
(
left:
16
,
right:
16
,
top:
16
+
topExpand
+
36
),
//
all(16),
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
children:
[
children:
[
...
@@ -72,6 +70,7 @@ class CreatePasswordScreen extends StatelessWidget {
...
@@ -72,6 +70,7 @@ class CreatePasswordScreen extends StatelessWidget {
),
),
SizedBox
.
expand
(),
SizedBox
.
expand
(),
Positioned
(
left:
0
,
right:
0
,
bottom:
16
,
child:
_buildContinueButton
(
vm
)),
Positioned
(
left:
0
,
right:
0
,
bottom:
16
,
child:
_buildContinueButton
(
vm
)),
Positioned
(
top:
topExpand
,
left:
8
,
child:
CustomBackButton
()),
],
],
),
),
),
),
...
...
lib/features/faqs/faq_detail_screen.dart
deleted
100644 → 0
View file @
b3c72190
import
'package:flutter/material.dart'
;
import
'faqs_model.dart'
;
class
FAQDetailScreen
extends
StatelessWidget
{
final
PageItemModel
faqItem
;
const
FAQDetailScreen
({
super
.
key
,
required
this
.
faqItem
});
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
title:
Text
(
faqItem
.
title
??
""
,
style:
const
TextStyle
(
fontWeight:
FontWeight
.
bold
)),
backgroundColor:
Colors
.
white
,
foregroundColor:
Colors
.
black
,
elevation:
0
,
),
body:
Padding
(
padding:
const
EdgeInsets
.
all
(
16.0
),
child:
Text
(
faqItem
.
chapeau
??
""
,
style:
const
TextStyle
(
fontSize:
16
,
color:
Colors
.
black87
),
),
),
);
}
}
lib/features/home/custom_widget/brand_grid_widget.dart
View file @
2cf5375a
...
@@ -51,47 +51,52 @@ class BrandGridWidget extends StatelessWidget {
...
@@ -51,47 +51,52 @@ class BrandGridWidget extends StatelessWidget {
return
LayoutBuilder
(
return
LayoutBuilder
(
builder:
(
context
,
constraints
)
{
builder:
(
context
,
constraints
)
{
final
double
imageWidth
=
constraints
.
maxWidth
/
3
;
final
double
imageWidth
=
constraints
.
maxWidth
/
3
;
return
Container
(
return
GestureDetector
(
padding:
const
EdgeInsets
.
all
(
4
),
onTap:
()
{
color:
index
%
2
!=
0
?
Colors
.
red
.
shade50
:
Colors
.
white
,
onTap
?.
call
(
brand
);
child:
Column
(
},
mainAxisAlignment:
MainAxisAlignment
.
center
,
child:
Container
(
children:
[
padding:
const
EdgeInsets
.
all
(
4
),
ClipRRect
(
color:
index
%
2
!=
0
?
Colors
.
red
.
shade50
:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
8
),
child:
Column
(
child:
SizedBox
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
width:
imageWidth
,
children:
[
height:
imageWidth
,
ClipRRect
(
child:
loadNetworkImage
(
borderRadius:
BorderRadius
.
circular
(
8
),
url:
brand
.
logo
??
""
,
child:
SizedBox
(
fit:
BoxFit
.
contain
,
width:
imageWidth
,
placeholderAsset:
"assets/images/bg_default_11.png"
,
height:
imageWidth
,
child:
loadNetworkImage
(
url:
brand
.
logo
??
""
,
fit:
BoxFit
.
contain
,
placeholderAsset:
"assets/images/bg_default_11.png"
,
),
),
),
),
),
),
const
SizedBox
(
height:
4
),
const
SizedBox
(
height:
4
),
Text
(
Text
(
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
brand
.
brandName
??
""
,
brand
.
brandName
??
""
,
maxLines:
2
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
style:
const
TextStyle
(
fontWeight:
FontWeight
.
w600
,
fontSize:
14
)
,
style:
const
TextStyle
(
fontWeight:
FontWeight
.
w600
,
fontSize:
14
),
),
),
const
SizedBox
(
height:
4
),
const
SizedBox
(
height:
4
),
RichText
(
RichText
(
textAlign:
TextAlign
.
center
,
text
Align
:
Text
Align
.
center
,
text:
Text
Span
(
text:
TextSpan
(
style:
const
TextStyle
(
fontSize:
12
),
style:
const
TextStyle
(
fontSize:
12
),
children:
[
children:
[
const
TextSpan
(
text:
"Hoàn đến: "
,
style:
TextStyle
(
color:
Colors
.
grey
)),
const
TextSpan
(
text:
"Hoàn đến: "
,
style:
TextStyle
(
color:
Colors
.
grey
)),
TextSpan
(
TextSpan
(
text:
brand
.
pointAccumulationRate
??
''
,
text:
brand
.
pointAccumulationRate
??
''
,
style:
const
TextStyle
(
color:
Colors
.
orange
,
fontWeight:
FontWeight
.
bold
)
,
style:
const
TextStyle
(
color:
Colors
.
orange
,
fontWeight:
FontWeight
.
bold
),
),
)
,
]
,
]
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
);
);
},
},
...
...
lib/features/home/home_screen.dart
View file @
2cf5375a
...
@@ -148,7 +148,9 @@ class _HomeScreenState extends BaseState<HomeScreen> with PopupOnInit, BasicStat
...
@@ -148,7 +148,9 @@ class _HomeScreenState extends BaseState<HomeScreen> with PopupOnInit, BasicStat
return
BrandGridWidget
(
return
BrandGridWidget
(
brands:
_viewModel
.
brands
,
brands:
_viewModel
.
brands
,
sectionConfig:
_viewModel
.
getMainSectionConfigModel
(
HeaderSectionType
.
brand
),
sectionConfig:
_viewModel
.
getMainSectionConfigModel
(
HeaderSectionType
.
brand
),
onTap:
(
_
)
{},
onTap:
(
data
)
{
Get
.
toNamed
(
affiliateBrandDetailScreen
,
arguments:
{
"brandId"
:
data
.
brandId
});
},
);
);
case
HeaderSectionType
.
pointPartner
:
case
HeaderSectionType
.
pointPartner
:
if
(
_viewModel
.
affiliates
.
isEmpty
)
return
null
;
if
(
_viewModel
.
affiliates
.
isEmpty
)
return
null
;
...
...
lib/features/invite_friend_campaign/campaign_invite_referral_info/campaign_invite_referral_info_screen.dart
View file @
2cf5375a
...
@@ -5,6 +5,7 @@ import 'package:get/get.dart';
...
@@ -5,6 +5,7 @@ import 'package:get/get.dart';
import
'package:mypoint_flutter_app/app/routing/directional_action_type.dart'
;
import
'package:mypoint_flutter_app/app/routing/directional_action_type.dart'
;
import
'package:mypoint_flutter_app/core/theme/base_color.dart'
;
import
'package:mypoint_flutter_app/core/theme/base_color.dart'
;
import
'package:mypoint_flutter_app/shared/navigation/directional_screen.dart'
;
import
'package:mypoint_flutter_app/shared/navigation/directional_screen.dart'
;
import
'../../../app/config/constants.dart'
;
import
'../../../shared/widgets/alert/custom_alert_dialog.dart'
;
import
'../../../shared/widgets/alert/custom_alert_dialog.dart'
;
import
'../../../shared/widgets/alert/data_alert_model.dart'
;
import
'../../../shared/widgets/alert/data_alert_model.dart'
;
import
'../../../shared/widgets/base_view/base_screen.dart'
;
import
'../../../shared/widgets/base_view/base_screen.dart'
;
...
@@ -87,7 +88,7 @@ class _CampaignInviteReferralInfoScreenState extends BaseState<CampaignInviteRef
...
@@ -87,7 +88,7 @@ class _CampaignInviteReferralInfoScreenState extends BaseState<CampaignInviteRef
return
Scaffold
(
return
Scaffold
(
backgroundColor:
Colors
.
grey
.
shade100
,
backgroundColor:
Colors
.
grey
.
shade100
,
appBar:
PreferredSize
(
appBar:
PreferredSize
(
preferredSize:
const
Size
.
fromHeight
(
kToolbarHeight
),
preferredSize:
Size
.
fromHeight
(
kToolbarHeight
+
Constants
.
extendTopPaddingNavigation
),
child:
Obx
(()
{
child:
Obx
(()
{
final
title
=
_viewModel
.
campaignDetail
.
value
?.
name
??
'Chi tiết chiến dịch'
;
final
title
=
_viewModel
.
campaignDetail
.
value
?.
name
??
'Chi tiết chiến dịch'
;
return
CustomNavigationBar
(
title:
title
);
return
CustomNavigationBar
(
title:
title
);
...
...
lib/features/invite_friend_campaign/invite_friend_campaign_screen.dart
View file @
2cf5375a
...
@@ -7,6 +7,7 @@ import 'package:share_plus/share_plus.dart';
...
@@ -7,6 +7,7 @@ import 'package:share_plus/share_plus.dart';
import
'package:url_launcher/url_launcher.dart'
;
import
'package:url_launcher/url_launcher.dart'
;
import
'../../../features/invite_friend_campaign/popup_invite_friend_code.dart'
;
import
'../../../features/invite_friend_campaign/popup_invite_friend_code.dart'
;
import
'../../../shared/widgets/custom_toast_message.dart'
;
import
'../../../shared/widgets/custom_toast_message.dart'
;
import
'../../app/config/constants.dart'
;
import
'../../shared/widgets/base_view/base_screen.dart'
;
import
'../../shared/widgets/base_view/base_screen.dart'
;
import
'../../shared/widgets/base_view/basic_state.dart'
;
import
'../../shared/widgets/base_view/basic_state.dart'
;
import
'../../core/theme/base_color.dart'
;
import
'../../core/theme/base_color.dart'
;
...
@@ -54,7 +55,7 @@ class _InviteFriendCampaignScreenState extends BaseState<InviteFriendCampaignScr
...
@@ -54,7 +55,7 @@ class _InviteFriendCampaignScreenState extends BaseState<InviteFriendCampaignScr
Widget
createBody
()
{
Widget
createBody
()
{
return
Scaffold
(
return
Scaffold
(
appBar:
PreferredSize
(
appBar:
PreferredSize
(
preferredSize:
const
Size
.
fromHeight
(
kToolbarHeight
),
preferredSize:
Size
.
fromHeight
(
kToolbarHeight
+
Constants
.
extendTopPaddingNavigation
),
child:
Obx
(()
{
child:
Obx
(()
{
final
title
=
viewModel
.
inviteFriendDetail
.
value
?.
name
??
'Mời bạn bè'
;
final
title
=
viewModel
.
inviteFriendDetail
.
value
?.
name
??
'Mời bạn bè'
;
return
CustomNavigationBar
(
title:
title
);
return
CustomNavigationBar
(
title:
title
);
...
...
lib/features/login/login_screen.dart
View file @
2cf5375a
...
@@ -7,6 +7,7 @@ import '../../core/theme/base_color.dart';
...
@@ -7,6 +7,7 @@ import '../../core/theme/base_color.dart';
import
'../../shared/widgets/alert/custom_alert_dialog.dart'
;
import
'../../shared/widgets/alert/custom_alert_dialog.dart'
;
import
'../../shared/widgets/alert/data_alert_model.dart'
;
import
'../../shared/widgets/alert/data_alert_model.dart'
;
import
'../../shared/widgets/back_button.dart'
;
import
'../../shared/widgets/back_button.dart'
;
import
'../../shared/widgets/custom_navigation_bar.dart'
;
import
'../../shared/widgets/support_button.dart'
;
import
'../../shared/widgets/support_button.dart'
;
import
'login_viewmodel.dart'
;
import
'login_viewmodel.dart'
;
...
@@ -127,12 +128,11 @@ class _LoginScreenState extends BaseState<LoginScreen> with BasicState {
...
@@ -127,12 +128,11 @@ class _LoginScreenState extends BaseState<LoginScreen> with BasicState {
onTap:
hideKeyboard
,
onTap:
hideKeyboard
,
child:
Scaffold
(
child:
Scaffold
(
resizeToAvoidBottomInset:
false
,
resizeToAvoidBottomInset:
false
,
appBar:
AppBar
(
appBar:
CustomNavigationBar
(
automaticallyImplyLeading:
false
,
title:
''
,
backgroundColor:
Colors
.
white
,
backgroundImage:
''
,
centerTitle:
true
,
leftButtons:
[
CustomBackButton
()],
leading:
CustomBackButton
(),
rightButtons:
[
SupportButton
()],
actions:
[
SupportButton
()],
),
),
backgroundColor:
Colors
.
white
,
backgroundColor:
Colors
.
white
,
body:
SafeArea
(
body:
SafeArea
(
...
...
lib/features/membership/membership_screen.dart
View file @
2cf5375a
...
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
...
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import
'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart'
;
import
'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart'
;
import
'package:get/get.dart'
;
import
'package:get/get.dart'
;
import
'package:mypoint_flutter_app/shared/widgets/image_loader.dart'
;
import
'package:mypoint_flutter_app/shared/widgets/image_loader.dart'
;
import
'../../app/config/constants.dart'
;
import
'../../shared/widgets/base_view/base_screen.dart'
;
import
'../../shared/widgets/base_view/base_screen.dart'
;
import
'../../shared/widgets/base_view/basic_state.dart'
;
import
'../../shared/widgets/base_view/basic_state.dart'
;
import
'../../shared/router_gage.dart'
;
import
'../../shared/router_gage.dart'
;
...
@@ -157,7 +158,7 @@ class _MembershipScreenState extends BaseState<MembershipScreen> with BasicState
...
@@ -157,7 +158,7 @@ class _MembershipScreenState extends BaseState<MembershipScreen> with BasicState
}
}
Widget
_buildTopBar
()
{
Widget
_buildTopBar
()
{
final
top
=
MediaQuery
.
of
(
context
).
padding
.
top
+
8
;
final
top
=
MediaQuery
.
of
(
context
).
padding
.
top
+
8
+
Constants
.
extendTopPaddingNavigation
;
return
Positioned
(
return
Positioned
(
top:
top
,
top:
top
,
left:
0
,
left:
0
,
...
...
lib/features/otp/otp_screen.dart
View file @
2cf5375a
...
@@ -5,6 +5,7 @@ import '../../shared/widgets/base_view/base_screen.dart';
...
@@ -5,6 +5,7 @@ import '../../shared/widgets/base_view/base_screen.dart';
import
'../../shared/widgets/base_view/basic_state.dart'
;
import
'../../shared/widgets/base_view/basic_state.dart'
;
import
'../../core/theme/base_color.dart'
;
import
'../../core/theme/base_color.dart'
;
import
'../../shared/widgets/back_button.dart'
;
import
'../../shared/widgets/back_button.dart'
;
import
'../../shared/widgets/custom_navigation_bar.dart'
;
import
'../../shared/widgets/support_button.dart'
;
import
'../../shared/widgets/support_button.dart'
;
import
'otp_viewmodel.dart'
;
import
'otp_viewmodel.dart'
;
...
@@ -36,12 +37,11 @@ class _OtpScreenState extends BaseState<OtpScreen> with BasicState {
...
@@ -36,12 +37,11 @@ class _OtpScreenState extends BaseState<OtpScreen> with BasicState {
Widget
createBody
()
{
Widget
createBody
()
{
final
otpVM
=
Get
.
put
(
OtpViewModel
(
widget
.
repository
));
final
otpVM
=
Get
.
put
(
OtpViewModel
(
widget
.
repository
));
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
appBar:
CustomNavigationBar
(
centerTitle:
true
,
title:
''
,
leading:
CustomBackButton
(),
backgroundImage:
''
,
actions:
[
leftButtons:
[
CustomBackButton
()],
SupportButton
(),
rightButtons:
[
SupportButton
()],
],
),
),
body:
SafeArea
(
body:
SafeArea
(
child:
GestureDetector
(
child:
GestureDetector
(
...
...
lib/features/pageDetail/campaign_detail_screen.dart
View file @
2cf5375a
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart'
;
import
'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart'
;
import
'package:get/get.dart'
;
import
'package:get/get.dart'
;
import
'package:mypoint_flutter_app/app/config/constants.dart'
;
import
'package:mypoint_flutter_app/shared/widgets/custom_empty_widget.dart'
;
import
'package:mypoint_flutter_app/shared/widgets/custom_empty_widget.dart'
;
import
'package:share_plus/share_plus.dart'
;
import
'package:share_plus/share_plus.dart'
;
import
'../../shared/widgets/base_view/base_screen.dart'
;
import
'../../shared/widgets/base_view/base_screen.dart'
;
...
@@ -56,10 +57,11 @@ class _CampaignDetailScreenState extends BaseState<CampaignDetailScreen> with Ba
...
@@ -56,10 +57,11 @@ class _CampaignDetailScreenState extends BaseState<CampaignDetailScreen> with Ba
return
Stack
(
return
Stack
(
children:
[
children:
[
Center
(
child:
EmptyWidget
(
isLoading:
_viewModel
.
isLoading
.
value
)),
Center
(
child:
EmptyWidget
(
isLoading:
_viewModel
.
isLoading
.
value
)),
Positioned
(
top:
MediaQuery
Positioned
(
.
of
(
context
)
top:
MediaQuery
.
of
(
context
).
padding
.
top
+
8
+
Constants
.
extendTopPaddingNavigation
,
.
padding
left:
8
,
.
top
+
8
,
left:
8
,
child:
CustomBackButton
()),
child:
CustomBackButton
(),
),
],
],
);
);
}
}
...
@@ -116,7 +118,7 @@ class _CampaignDetailScreenState extends BaseState<CampaignDetailScreen> with Ba
...
@@ -116,7 +118,7 @@ class _CampaignDetailScreenState extends BaseState<CampaignDetailScreen> with Ba
),
),
if
(
showShareButton
)
if
(
showShareButton
)
Positioned
(
Positioned
(
top:
MediaQuery
.
of
(
context
).
padding
.
top
+
8
,
top:
MediaQuery
.
of
(
context
).
padding
.
top
+
8
+
Constants
.
extendTopPaddingNavigation
,
right:
12
,
right:
12
,
child:
SizedBox
(
child:
SizedBox
(
width:
32
,
width:
32
,
...
@@ -127,9 +129,7 @@ class _CampaignDetailScreenState extends BaseState<CampaignDetailScreen> with Ba
...
@@ -127,9 +129,7 @@ class _CampaignDetailScreenState extends BaseState<CampaignDetailScreen> with Ba
child:
IconButton
(
child:
IconButton
(
onPressed:
()
{
onPressed:
()
{
final
content
=
pageDetail
.
shareContent
??
""
;
final
content
=
pageDetail
.
shareContent
??
""
;
SharePlus
.
instance
.
share
(
SharePlus
.
instance
.
share
(
ShareParams
(
text:
content
,
title:
"Chia sẻ từ MyPoint"
));
ShareParams
(
text:
content
,
title:
"Chia sẻ từ MyPoint"
),
);
_viewModel
.
submitShareContent
();
_viewModel
.
submitShareContent
();
},
},
icon:
const
Icon
(
Icons
.
share
,
size:
16
),
icon:
const
Icon
(
Icons
.
share
,
size:
16
),
...
@@ -137,7 +137,7 @@ class _CampaignDetailScreenState extends BaseState<CampaignDetailScreen> with Ba
...
@@ -137,7 +137,7 @@ class _CampaignDetailScreenState extends BaseState<CampaignDetailScreen> with Ba
),
),
),
),
),
),
Positioned
(
top:
MediaQuery
.
of
(
context
).
padding
.
top
+
8
,
left:
8
,
child:
CustomBackButton
()),
Positioned
(
top:
MediaQuery
.
of
(
context
).
padding
.
top
+
8
+
Constants
.
extendTopPaddingNavigation
,
left:
8
,
child:
CustomBackButton
()),
if
(
buttonOn
==
"1"
)
_bottomButton
(
pageDetail
),
if
(
buttonOn
==
"1"
)
_bottomButton
(
pageDetail
),
],
],
);
);
...
...
lib/features/personal/personal_screen.dart
View file @
2cf5375a
...
@@ -77,7 +77,7 @@ class _PersonalScreenState extends BaseState<PersonalScreen> with BasicState, Po
...
@@ -77,7 +77,7 @@ class _PersonalScreenState extends BaseState<PersonalScreen> with BasicState, Po
final
name
=
DataPreference
.
instance
.
displayName
;
final
name
=
DataPreference
.
instance
.
displayName
;
final
level
=
DataPreference
.
instance
.
rankName
??
"Hạng Đồng"
;
final
level
=
DataPreference
.
instance
.
rankName
??
"Hạng Đồng"
;
final
email
=
DataPreference
.
instance
.
profile
?.
workerSite
?.
email
??
""
;
final
email
=
DataPreference
.
instance
.
profile
?.
workerSite
?.
email
??
""
;
final
topWebPadding
=
kIsWeb
?
Constants
.
web
TopPadding
:
0.0
;
final
topWebPadding
=
Constants
.
extend
TopPadding
Navigation
;
return
Container
(
return
Container
(
height:
width
*
163
/
375
+
topWebPadding
,
height:
width
*
163
/
375
+
topWebPadding
,
decoration:
BoxDecoration
(
image:
DecorationImage
(
image:
NetworkImage
(
data
.
background
??
""
),
fit:
BoxFit
.
cover
)),
decoration:
BoxDecoration
(
image:
DecorationImage
(
image:
NetworkImage
(
data
.
background
??
""
),
fit:
BoxFit
.
cover
)),
...
@@ -341,9 +341,9 @@ class _PersonalScreenState extends BaseState<PersonalScreen> with BasicState, Po
...
@@ -341,9 +341,9 @@ class _PersonalScreenState extends BaseState<PersonalScreen> with BasicState, Po
await
LogoutService
.
logout
();
await
LogoutService
.
logout
();
if
(
kIsWeb
)
{
//
if (kIsWeb) {
await
DataPreference
.
instance
.
clearData
();
//
await DataPreference.instance.clearData();
Get
.
offAllNamed
(
onboardingScreen
);
//
Get.offAllNamed(onboardingScreen);
// final closed = await webCloseApp({
// final closed = await webCloseApp({
// 'message': 'User logged out successfully',
// 'message': 'User logged out successfully',
// 'timestamp': DateTime.now().millisecondsSinceEpoch,
// 'timestamp': DateTime.now().millisecondsSinceEpoch,
...
@@ -351,8 +351,8 @@ class _PersonalScreenState extends BaseState<PersonalScreen> with BasicState, Po
...
@@ -351,8 +351,8 @@ class _PersonalScreenState extends BaseState<PersonalScreen> with BasicState, Po
// if (!closed) {
// if (!closed) {
// Get.offAllNamed(onboardingScreen);
// Get.offAllNamed(onboardingScreen);
// }
// }
return
;
//
return;
}
//
}
if
(
phone
.
isNotEmpty
)
{
if
(
phone
.
isNotEmpty
)
{
await
DataPreference
.
instance
.
clearLoginToken
();
await
DataPreference
.
instance
.
clearLoginToken
();
...
...
lib/features/popup_manager/popup_manager_screen.dart
View file @
2cf5375a
...
@@ -20,7 +20,7 @@ Future<void> showPopupManagerScreen(
...
@@ -20,7 +20,7 @@ Future<void> showPopupManagerScreen(
required
PopupManagerModel
modelPopup
,
required
PopupManagerModel
modelPopup
,
VoidCallback
?
onDismissed
,
VoidCallback
?
onDismissed
,
})
async
{
})
async
{
int
timeCountDown
=
int
.
tryParse
(
modelPopup
.
timeCountDown
??
'10
00000
'
)
??
10
00000
;
int
timeCountDown
=
int
.
tryParse
(
modelPopup
.
timeCountDown
??
'10'
)
??
10
;
final
popupId
=
modelPopup
.
id
??
''
;
final
popupId
=
modelPopup
.
id
??
''
;
final
requestId
=
modelPopup
.
requestId
??
''
;
final
requestId
=
modelPopup
.
requestId
??
''
;
logPopupShowing
(
popupId:
popupId
,
requestId:
requestId
);
logPopupShowing
(
popupId:
popupId
,
requestId:
requestId
);
...
...
lib/features/quiz_campaign/quiz_campaign_header.dart
View file @
2cf5375a
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'../../app/config/constants.dart'
;
import
'../../shared/widgets/back_button.dart'
;
import
'../../shared/widgets/back_button.dart'
;
class
QuizCampaignHeader
extends
StatelessWidget
{
class
QuizCampaignHeader
extends
StatelessWidget
{
...
@@ -19,7 +20,7 @@ class QuizCampaignHeader extends StatelessWidget {
...
@@ -19,7 +20,7 @@ class QuizCampaignHeader extends StatelessWidget {
return
Stack
(
return
Stack
(
children:
[
children:
[
Container
(
Container
(
padding:
EdgeInsets
.
only
(
top:
topSpace
,
left:
16
,
right:
16
),
padding:
EdgeInsets
.
only
(
top:
topSpace
+
Constants
.
extendTopPaddingNavigation
,
left:
16
,
right:
16
),
color:
const
Color
(
0xFFFFF1F3
),
color:
const
Color
(
0xFFFFF1F3
),
child:
Column
(
child:
Column
(
children:
[
children:
[
...
...
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