|
@@ -120,10 +120,10 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
alignment: Alignment.topRight,
|
|
alignment: Alignment.topRight,
|
|
|
children: [
|
|
children: [
|
|
|
U.iconsax('sms-notification', color: primaryColor),
|
|
U.iconsax('sms-notification', color: primaryColor),
|
|
|
- Provider.of<ServiceModule>(context).unreadMessage() ? Container(
|
|
|
|
|
|
|
+ if(Provider.of<ServiceModule>(context).unreadMessage()) Container(
|
|
|
width: 9, height: 9, margin: EdgeInsets.only(top: 1.3),
|
|
width: 9, height: 9, margin: EdgeInsets.only(top: 1.3),
|
|
|
decoration: BoxDecoration(color: Colors.red, borderRadius: BorderRadius.all(Radius.circular(50))),
|
|
decoration: BoxDecoration(color: Colors.red, borderRadius: BorderRadius.all(Radius.circular(50))),
|
|
|
- ):Container()
|
|
|
|
|
|
|
+ ),
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
@@ -159,10 +159,10 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
).withHover()
|
|
).withHover()
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
- Provider.of<UserModule>(context).profile()['greeting'][context.locale.toString()] != null ? Padding(
|
|
|
|
|
|
|
+ if(Provider.of<UserModule>(context).profile()['greeting'][context.locale.toString()] != null) Padding(
|
|
|
padding: EdgeInsets.fromLTRB(15, 5, 15, 0),
|
|
padding: EdgeInsets.fromLTRB(15, 5, 15, 0),
|
|
|
child: Text(Provider.of<UserModule>(context).profile()['greeting'][context.locale.toString()], style: TextStyle(color: Colors.white, fontSize: 14), overflow: TextOverflow.ellipsis),
|
|
child: Text(Provider.of<UserModule>(context).profile()['greeting'][context.locale.toString()], style: TextStyle(color: Colors.white, fontSize: 14), overflow: TextOverflow.ellipsis),
|
|
|
- ) : Container(),
|
|
|
|
|
|
|
+ ),
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
@@ -295,7 +295,6 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
Expanded(
|
|
Expanded(
|
|
|
child: Container(
|
|
child: Container(
|
|
|
width: double.infinity, height: double.infinity,
|
|
width: double.infinity, height: double.infinity,
|
|
|
- child: Provider.of<ServiceModule>(context).banner()[i]['image'] != null ? null : Center(child: Text("noImage".tr(), style: TextStyle(fontStyle: FontStyle.italic, color: Colors.black38), textAlign: TextAlign.center)),
|
|
|
|
|
decoration: BoxDecoration(
|
|
decoration: BoxDecoration(
|
|
|
color: textColor.withValues(alpha: 0.1),
|
|
color: textColor.withValues(alpha: 0.1),
|
|
|
borderRadius: BorderRadius.all(Radius.circular(12)),
|
|
borderRadius: BorderRadius.all(Radius.circular(12)),
|
|
@@ -304,6 +303,7 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
fit: BoxFit.cover,
|
|
fit: BoxFit.cover,
|
|
|
):null,
|
|
):null,
|
|
|
),
|
|
),
|
|
|
|
|
+ child: Provider.of<ServiceModule>(context).banner()[i]['image'] != null ? null : Center(child: Text("noImage".tr(), style: TextStyle(fontStyle: FontStyle.italic, color: Colors.black38), textAlign: TextAlign.center)),
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
|
Container(
|
|
Container(
|
|
@@ -350,7 +350,7 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
) : Container(),
|
|
) : Container(),
|
|
|
):Container(),
|
|
):Container(),
|
|
|
|
|
|
|
|
- Provider.of<UserModule>(context).profile()['topMenu']['show'] != null && Provider.of<UserModule>(context).profile()['topMenu']['show'] == true ? Container(
|
|
|
|
|
|
|
+ if(Provider.of<UserModule>(context).profile()['topMenu']['show'] != null && Provider.of<UserModule>(context).profile()['topMenu']['show'] == true) Container(
|
|
|
margin: EdgeInsets.only(top: 25, bottom: 25),
|
|
margin: EdgeInsets.only(top: 25, bottom: 25),
|
|
|
padding: EdgeInsets.only(top: 20, bottom: 10),
|
|
padding: EdgeInsets.only(top: 20, bottom: 10),
|
|
|
decoration: BoxDecoration(color: Colors.white, border: Border.all(color: textColor.withValues(alpha: 0.15)), borderRadius: BorderRadius.all(Radius.circular(12))),
|
|
decoration: BoxDecoration(color: Colors.white, border: Border.all(color: textColor.withValues(alpha: 0.15)), borderRadius: BorderRadius.all(Radius.circular(12))),
|
|
@@ -362,7 +362,7 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
double minHeight = 135;
|
|
double minHeight = 135;
|
|
|
return Row(
|
|
return Row(
|
|
|
children: [
|
|
children: [
|
|
|
- Provider.of<ServiceModule>(context).topMenu() != null ? Row(
|
|
|
|
|
|
|
+ if(Provider.of<ServiceModule>(context).topMenu() != null) Row(
|
|
|
children: List.generate(Provider.of<ServiceModule>(context).topMenu()!.length+1, (i) {
|
|
children: List.generate(Provider.of<ServiceModule>(context).topMenu()!.length+1, (i) {
|
|
|
bool hideOther = i == Provider.of<ServiceModule>(context).topMenu()!.length && U.servantDisplay() && Provider.of<ServiceModule>(context).reqGroup()!.length == 0;
|
|
bool hideOther = i == Provider.of<ServiceModule>(context).topMenu()!.length && U.servantDisplay() && Provider.of<ServiceModule>(context).reqGroup()!.length == 0;
|
|
|
return ConstrainedBox(
|
|
return ConstrainedBox(
|
|
@@ -378,18 +378,18 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
hideOther ? Container(width: size/1.8) : i == Provider.of<ServiceModule>(context).topMenu()!.length ? Container(
|
|
hideOther ? Container(width: size/1.8) : i == Provider.of<ServiceModule>(context).topMenu()!.length ? Container(
|
|
|
child: Container(
|
|
child: Container(
|
|
|
padding: EdgeInsets.all(5),
|
|
padding: EdgeInsets.all(5),
|
|
|
- child: SizedBox(width: size/1.8, height: size/1.8, child: U.iconsax('category', color: Color(0xff564F4F), size: 34)),
|
|
|
|
|
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(20)), boxShadow: [BoxShadow(color: Colors.grey.withValues(alpha: 0.3), blurRadius: 3, offset: Offset(0, 1))]),
|
|
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(20)), boxShadow: [BoxShadow(color: Colors.grey.withValues(alpha: 0.3), blurRadius: 3, offset: Offset(0, 1))]),
|
|
|
|
|
+ child: SizedBox(width: size/1.8, height: size/1.8, child: U.iconsax('category', color: Color(0xff564F4F), size: 34)),
|
|
|
),
|
|
),
|
|
|
) : Container(
|
|
) : Container(
|
|
|
padding: EdgeInsets.all(5),
|
|
padding: EdgeInsets.all(5),
|
|
|
- child: Image(image: CachedNetworkImageProvider(Provider.of<ServiceModule>(context).topMenu()![i]['iconUrl']+'?bridge-cache=true', cacheManager: CacheManager(CacheMan.config(Provider.of<ServiceModule>(context).topMenu()![i]['iconUrl']+'?bridge-cache=true'))), width: size/1.8, height: size/1.8),
|
|
|
|
|
decoration: BoxDecoration(
|
|
decoration: BoxDecoration(
|
|
|
color: Colors.white,
|
|
color: Colors.white,
|
|
|
borderRadius: BorderRadius.all(Radius.circular(20)),
|
|
borderRadius: BorderRadius.all(Radius.circular(20)),
|
|
|
border: Border.all(width: 0.2, color: Colors.black12),
|
|
border: Border.all(width: 0.2, color: Colors.black12),
|
|
|
boxShadow: [BoxShadow(color: Colors.grey.withValues(alpha: 0.3), blurRadius: 2, offset: Offset(0, 2))]
|
|
boxShadow: [BoxShadow(color: Colors.grey.withValues(alpha: 0.3), blurRadius: 2, offset: Offset(0, 2))]
|
|
|
),
|
|
),
|
|
|
|
|
+ child: Image(image: CachedNetworkImageProvider(Provider.of<ServiceModule>(context).topMenu()![i]['iconUrl']+'?bridge-cache=true', cacheManager: CacheManager(CacheMan.config(Provider.of<ServiceModule>(context).topMenu()![i]['iconUrl']+'?bridge-cache=true'))), width: size/1.8, height: size/1.8),
|
|
|
),
|
|
),
|
|
|
SizedBox(height: hideOther ? 0:8),
|
|
SizedBox(height: hideOther ? 0:8),
|
|
|
Expanded(
|
|
Expanded(
|
|
@@ -414,8 +414,8 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
),
|
|
),
|
|
|
);
|
|
);
|
|
|
}),
|
|
}),
|
|
|
- ) : Container(),
|
|
|
|
|
- Provider.of<UserModule>(context).user()['checkedIn'] && Provider.of<UserModule>(context).houseKeeping() && Provider.of<UserModule>(context).dndStatus() ? GestureDetector(
|
|
|
|
|
|
|
+ ),
|
|
|
|
|
+ if(Provider.of<UserModule>(context).user()['checkedIn'] && Provider.of<UserModule>(context).houseKeeping() && Provider.of<UserModule>(context).dndStatus()) GestureDetector(
|
|
|
child: Container(
|
|
child: Container(
|
|
|
width: size*2, padding: EdgeInsets.symmetric(horizontal: 25),
|
|
width: size*2, padding: EdgeInsets.symmetric(horizontal: 25),
|
|
|
decoration: BoxDecoration(border: Border(left: BorderSide(color: Colors.grey))),
|
|
decoration: BoxDecoration(border: Border(left: BorderSide(color: Colors.grey))),
|
|
@@ -439,12 +439,12 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
),
|
|
),
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
- ).withHover() : Container()
|
|
|
|
|
|
|
+ ).withHover(),
|
|
|
],
|
|
],
|
|
|
);
|
|
);
|
|
|
},
|
|
},
|
|
|
),
|
|
),
|
|
|
- Provider.of<ServiceModule>(context).expand() ? Column(
|
|
|
|
|
|
|
+ if(Provider.of<ServiceModule>(context).expand()) Column(
|
|
|
children: [
|
|
children: [
|
|
|
Padding(padding: EdgeInsets.symmetric(horizontal: 30, vertical: 15), child: divider()),
|
|
Padding(padding: EdgeInsets.symmetric(horizontal: 30, vertical: 15), child: divider()),
|
|
|
Align(
|
|
Align(
|
|
@@ -509,13 +509,14 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
},
|
|
},
|
|
|
)
|
|
)
|
|
|
],
|
|
],
|
|
|
- ) : Container(),
|
|
|
|
|
|
|
+ ),
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
- ) : Container(),
|
|
|
|
|
- Provider.of<UserModule>(context).profile()['topMenu']['show'] != null && Provider.of<UserModule>(context).profile()['topMenu']['show'] == true ? separator() : Container(),
|
|
|
|
|
|
|
+ ),
|
|
|
|
|
+
|
|
|
|
|
+ if(Provider.of<UserModule>(context).profile()['topMenu']['show'] != null && Provider.of<UserModule>(context).profile()['topMenu']['show'] == true) separator(),
|
|
|
|
|
|
|
|
- Provider.of<UserModule>(context).profile()['specialOffer'] != null && Provider.of<UserModule>(context).profile()['specialOffer']['show'] == true ? Container(
|
|
|
|
|
|
|
+ if(Provider.of<UserModule>(context).profile()['specialOffer'] != null && Provider.of<UserModule>(context).profile()['specialOffer']['show'] == true) Container(
|
|
|
width: double.infinity,
|
|
width: double.infinity,
|
|
|
margin: EdgeInsets.only(top: 25),
|
|
margin: EdgeInsets.only(top: 25),
|
|
|
child: Column(
|
|
child: Column(
|
|
@@ -564,9 +565,9 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
) : emptyWidget()
|
|
) : emptyWidget()
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
- ) : Container(),
|
|
|
|
|
|
|
+ ),
|
|
|
|
|
|
|
|
- Provider.of<UserModule>(context).profile()['frequentlyRequested'] != null && Provider.of<UserModule>(context).profile()['frequentlyRequested']['show'] == true ? Container(
|
|
|
|
|
|
|
+ if(Provider.of<UserModule>(context).profile()['frequentlyRequested'] != null && Provider.of<UserModule>(context).profile()['frequentlyRequested']['show'] == true) Container(
|
|
|
width: double.infinity,
|
|
width: double.infinity,
|
|
|
margin: EdgeInsets.only(top: 36, bottom: 25),
|
|
margin: EdgeInsets.only(top: 36, bottom: 25),
|
|
|
child: Column(
|
|
child: Column(
|
|
@@ -619,7 +620,7 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
) : emptyWidget(),
|
|
) : emptyWidget(),
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
- ):Container(),
|
|
|
|
|
|
|
+ ),
|
|
|
|
|
|
|
|
Provider.of<UserModule>(context).profile()['quickAction'] != null && Provider.of<UserModule>(context).profile()['quickAction']['show'] == true ? separator() : Container(),
|
|
Provider.of<UserModule>(context).profile()['quickAction'] != null && Provider.of<UserModule>(context).profile()['quickAction']['show'] == true ? separator() : Container(),
|
|
|
Provider.of<UserModule>(context).profile()['quickAction'] != null && Provider.of<UserModule>(context).profile()['quickAction']['show'] == true ? Container(
|
|
Provider.of<UserModule>(context).profile()['quickAction'] != null && Provider.of<UserModule>(context).profile()['quickAction']['show'] == true ? Container(
|