|
|
|
@ -81,16 +81,13 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: Visibility(
|
|
|
|
|
|
|
|
visible: model.user.outSA == 1 ? false : true,
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
height: 125,
|
|
|
|
height: 125,
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
image: DecorationImage(
|
|
|
|
image: DecorationImage(
|
|
|
|
image:
|
|
|
|
image: AssetImage("assets/images/new-design/covid_bg_transparent.png"),
|
|
|
|
AssetImage("assets/images/new-design/covid_bg_transparent.png"),
|
|
|
|
|
|
|
|
fit: BoxFit.fill,
|
|
|
|
fit: BoxFit.fill,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
color: Colors.white.withOpacity(0.3),
|
|
|
|
color: Colors.white.withOpacity(0.3),
|
|
|
|
@ -163,7 +160,6 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: InkWell(
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () => Navigator.push(context, FadePage(page: LiveCareHome())),
|
|
|
|
onTap: () => Navigator.push(context, FadePage(page: LiveCareHome())),
|
|
|
|
@ -462,7 +458,6 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
if (projectViewModel.havePrivilege(64) ||
|
|
|
|
if (projectViewModel.havePrivilege(64) ||
|
|
|
|
projectViewModel.havePrivilege(65) ||
|
|
|
|
projectViewModel.havePrivilege(65) ||
|
|
|
|
projectViewModel.havePrivilege(67))
|
|
|
|
projectViewModel.havePrivilege(67))
|
|
|
|
if (model.user.outSA == 0)
|
|
|
|
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(left: 15, right: 15),
|
|
|
|
margin: EdgeInsets.only(left: 15, right: 15),
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
@ -470,18 +465,21 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
if (projectViewModel.havePrivilege(64))
|
|
|
|
if (projectViewModel.havePrivilege(64))
|
|
|
|
DashboardItem(
|
|
|
|
DashboardItem(
|
|
|
|
onTap: () {
|
|
|
|
onTap: (projectViewModel.user != null && model.isLogin && model.user.outSA == 0)
|
|
|
|
|
|
|
|
? () {
|
|
|
|
Navigator.push(
|
|
|
|
Navigator.push(
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
FadePage(
|
|
|
|
FadePage(
|
|
|
|
page: HomeHealthCarePage(),
|
|
|
|
page: HomeHealthCarePage(),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
: () {},
|
|
|
|
child: Center(
|
|
|
|
child: Center(
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.all(15.0),
|
|
|
|
padding: const EdgeInsets.all(15.0),
|
|
|
|
child: Column(
|
|
|
|
child: (projectViewModel.user != null && model.isLogin && model.user.outSA == 0)
|
|
|
|
|
|
|
|
? Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Image.asset(
|
|
|
|
Image.asset(
|
|
|
|
'assets/images/home_health_care_icon.png',
|
|
|
|
'assets/images/home_health_care_icon.png',
|
|
|
|
@ -499,8 +497,16 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.55,
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.55,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
: Container(
|
|
|
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
|
|
|
height: double.infinity,
|
|
|
|
|
|
|
|
color: Colors.grey.withOpacity(0.7),
|
|
|
|
|
|
|
|
child: Icon(
|
|
|
|
|
|
|
|
Icons.lock_outline,
|
|
|
|
|
|
|
|
size: 40,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
height: MediaQuery.of(context).size.width * 0.4,
|
|
|
|
height: MediaQuery.of(context).size.width * 0.4,
|
|
|
|
imageName: 'home_healthcare_service_bg.png',
|
|
|
|
imageName: 'home_healthcare_service_bg.png',
|
|
|
|
@ -508,12 +514,21 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
if (projectViewModel.havePrivilege(65))
|
|
|
|
if (projectViewModel.havePrivilege(65))
|
|
|
|
DashboardItem(
|
|
|
|
DashboardItem(
|
|
|
|
onTap: () => getPharmacyToken(model),
|
|
|
|
onTap: () => (projectViewModel.user != null && model.isLogin && model.user.outSA == 0)
|
|
|
|
|
|
|
|
? getPharmacyToken(model)
|
|
|
|
|
|
|
|
: () {},
|
|
|
|
child: Center(
|
|
|
|
child: Center(
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.all(15.0),
|
|
|
|
padding: const EdgeInsets.all(15.0),
|
|
|
|
child: Column(
|
|
|
|
child: (projectViewModel.user != null && model.isLogin && model.user.outSA == 0)
|
|
|
|
|
|
|
|
? Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
// if (projectViewModel.user != null && model.isLogin && model.user.outSA == 1)
|
|
|
|
|
|
|
|
// Image.asset(
|
|
|
|
|
|
|
|
// 'assets/images/lock_icon.png',
|
|
|
|
|
|
|
|
// width: 50,
|
|
|
|
|
|
|
|
// height: 50,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
Image.asset(
|
|
|
|
Image.asset(
|
|
|
|
'assets/images/pharmacy_logo.png',
|
|
|
|
'assets/images/pharmacy_logo.png',
|
|
|
|
width: 40,
|
|
|
|
width: 40,
|
|
|
|
@ -530,6 +545,15 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.55,
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.55,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
: Container(
|
|
|
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
|
|
|
height: double.infinity,
|
|
|
|
|
|
|
|
color: Colors.grey.withOpacity(0.7),
|
|
|
|
|
|
|
|
child: Icon(
|
|
|
|
|
|
|
|
Icons.lock_outline,
|
|
|
|
|
|
|
|
size: 40,
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -538,18 +562,21 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
if (projectViewModel.havePrivilege(67))
|
|
|
|
if (projectViewModel.havePrivilege(67))
|
|
|
|
DashboardItem(
|
|
|
|
DashboardItem(
|
|
|
|
onTap: () {
|
|
|
|
onTap: (projectViewModel.user != null && model.isLogin && model.user.outSA == 0)
|
|
|
|
|
|
|
|
? () {
|
|
|
|
Navigator.push(
|
|
|
|
Navigator.push(
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
FadePage(
|
|
|
|
FadePage(
|
|
|
|
page: CMCPage(),
|
|
|
|
page: CMCPage(),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
: () {},
|
|
|
|
child: Center(
|
|
|
|
child: Center(
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.all(15.0),
|
|
|
|
padding: const EdgeInsets.all(15.0),
|
|
|
|
child: Column(
|
|
|
|
child: (projectViewModel.user != null && model.isLogin && model.user.outSA == 0)
|
|
|
|
|
|
|
|
? Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Image.asset(
|
|
|
|
Image.asset(
|
|
|
|
'assets/images/comprehensive_medical_checkup_logo.png',
|
|
|
|
'assets/images/comprehensive_medical_checkup_logo.png',
|
|
|
|
@ -567,6 +594,15 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.55,
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.55,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
: Container(
|
|
|
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
|
|
|
height: double.infinity,
|
|
|
|
|
|
|
|
color: Colors.grey.withOpacity(0.7),
|
|
|
|
|
|
|
|
child: Icon(
|
|
|
|
|
|
|
|
Icons.lock_outline,
|
|
|
|
|
|
|
|
size: 40,
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|