|
@@ -19,6 +19,7 @@ import 'package:telnow_mobile_new/src/layouts/web/request_select.dart';
|
|
|
import 'package:telnow_mobile_new/src/storage/sharedpreferences/shared_preferences_manager.dart';
|
|
import 'package:telnow_mobile_new/src/storage/sharedpreferences/shared_preferences_manager.dart';
|
|
|
import 'package:telnow_mobile_new/src/utils/U.dart';
|
|
import 'package:telnow_mobile_new/src/utils/U.dart';
|
|
|
import 'package:telnow_mobile_new/src/utils/cache_manager.dart';
|
|
import 'package:telnow_mobile_new/src/utils/cache_manager.dart';
|
|
|
|
|
+import 'package:telnow_mobile_new/src/utils/extensions.dart';
|
|
|
import 'package:telnow_mobile_new/src/utils/provider.dart';
|
|
import 'package:telnow_mobile_new/src/utils/provider.dart';
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
|
|
@@ -58,10 +59,7 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
bool _timeLimit = false;
|
|
bool _timeLimit = false;
|
|
|
|
|
|
|
|
checkCompatibility() async{
|
|
checkCompatibility() async{
|
|
|
- var isCompatible = await U.isCompatibleWith(VersionKey.multiBahasa);
|
|
|
|
|
- if(isCompatible) {
|
|
|
|
|
- homeFunc.getContactCenter(context);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ homeFunc.getContactCenter(context);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
@override
|
|
@@ -102,40 +100,17 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
val = val??true;
|
|
val = val??true;
|
|
|
if(val) homeFunc.getFrequentlyRequested();
|
|
if(val) homeFunc.getFrequentlyRequested();
|
|
|
}),
|
|
}),
|
|
|
- ),
|
|
|
|
|
|
|
+ ).withHover(),
|
|
|
),
|
|
),
|
|
|
SizedBox(width: 30),
|
|
SizedBox(width: 30),
|
|
|
- FutureBuilder(future: U.isCompatibleWith(VersionKey.multiBahasa), builder: (context, snapshot){
|
|
|
|
|
- if(!snapshot.hasData){
|
|
|
|
|
- return SizedBox();
|
|
|
|
|
- }
|
|
|
|
|
- final isCompatible = snapshot.data!;
|
|
|
|
|
- final hasContactCenter = Provider.of<ServiceModule>(context, listen: false)
|
|
|
|
|
- .contactCenter()
|
|
|
|
|
- .toString()
|
|
|
|
|
- .isNotEmpty;
|
|
|
|
|
-
|
|
|
|
|
- if (isCompatible && hasContactCenter) {
|
|
|
|
|
- return Container(
|
|
|
|
|
- padding: EdgeInsets.all(8),
|
|
|
|
|
- decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(50))),
|
|
|
|
|
- child: GestureDetector(
|
|
|
|
|
- onTap: () => launchUrl(Uri.parse(Provider.of<ServiceModule>(context, listen: false).contactCenter().toString())),
|
|
|
|
|
- child: U.iconsax('phone-number', color: primaryColor, size: 26.0)
|
|
|
|
|
- ),
|
|
|
|
|
- ); // replace with the widget you want to show
|
|
|
|
|
- } else {
|
|
|
|
|
- return SizedBox(); // or nothing
|
|
|
|
|
- }
|
|
|
|
|
- }),
|
|
|
|
|
- // U.isCompatibleWith(VersionKey.multiBahasa) && Provider.of<ServiceModule>(context, listen: false).contactCenter().toString() != '' ? Container(
|
|
|
|
|
- // padding: EdgeInsets.all(8),
|
|
|
|
|
- // decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(50))),
|
|
|
|
|
- // child: GestureDetector(
|
|
|
|
|
- // onTap: () => launchUrl(Uri.parse(Provider.of<ServiceModule>(context, listen: false).contactCenter().toString())),
|
|
|
|
|
- // child: U.iconsax('phone-number', color: primaryColor, size: 26.0)
|
|
|
|
|
- // ),
|
|
|
|
|
- // ):SizedBox(),
|
|
|
|
|
|
|
+ Provider.of<ServiceModule>(context, listen: false).contactCenter().toString().isNotEmpty ? Container(
|
|
|
|
|
+ padding: EdgeInsets.all(8),
|
|
|
|
|
+ decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(50))),
|
|
|
|
|
+ child: GestureDetector(
|
|
|
|
|
+ onTap: () => launchUrl(Uri.parse(Provider.of<ServiceModule>(context, listen: false).contactCenter().toString())),
|
|
|
|
|
+ child: U.iconsax('phone-number', color: primaryColor, size: 26.0)
|
|
|
|
|
+ ).withHover(),
|
|
|
|
|
+ ) : SizedBox(),
|
|
|
SizedBox(width: 10),
|
|
SizedBox(width: 10),
|
|
|
GestureDetector(
|
|
GestureDetector(
|
|
|
child: Container(
|
|
child: Container(
|
|
@@ -155,7 +130,7 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
onTap: ()=>navigateTo(context, WebMessageListPage(Provider.of<UserModule>(context, listen: false).user())).then((_){
|
|
onTap: ()=>navigateTo(context, WebMessageListPage(Provider.of<UserModule>(context, listen: false).user())).then((_){
|
|
|
homeFunc.getUnreadMessages(context);
|
|
homeFunc.getUnreadMessages(context);
|
|
|
}),
|
|
}),
|
|
|
- ),
|
|
|
|
|
|
|
+ ).withHover(),
|
|
|
SizedBox(width: 10),
|
|
SizedBox(width: 10),
|
|
|
GestureDetector(
|
|
GestureDetector(
|
|
|
child: Container(
|
|
child: Container(
|
|
@@ -168,7 +143,7 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
context.router.removeLast();
|
|
context.router.removeLast();
|
|
|
context.navigateToPath("/app/$pid/menu/history");
|
|
context.navigateToPath("/app/$pid/menu/history");
|
|
|
},
|
|
},
|
|
|
- ),
|
|
|
|
|
|
|
+ ).withHover(),
|
|
|
SizedBox(width: 10),
|
|
SizedBox(width: 10),
|
|
|
GestureDetector(
|
|
GestureDetector(
|
|
|
child: Container(
|
|
child: Container(
|
|
@@ -181,7 +156,7 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
context.router.removeLast();
|
|
context.router.removeLast();
|
|
|
context.navigateToPath("/app/$pid/menu/account");
|
|
context.navigateToPath("/app/$pid/menu/account");
|
|
|
},
|
|
},
|
|
|
- )
|
|
|
|
|
|
|
+ ).withHover()
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
Provider.of<UserModule>(context).profile()['greeting'][context.locale.toString()] != null ? Padding(
|
|
Provider.of<UserModule>(context).profile()['greeting'][context.locale.toString()] != null ? Padding(
|
|
@@ -197,84 +172,85 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
children: [
|
|
children: [
|
|
|
Text('${Provider.of<UserModule>(context).user()['name']}${(Provider.of<UserModule>(context).user()['guestName']!=null&&Provider.of<UserModule>(context).user()['guestName']!=''?' - ${Provider.of<UserModule>(context).user()['guestName']}':'')}', style: TextStyle(color: Colors.white, fontSize: 18), overflow: TextOverflow.ellipsis),
|
|
Text('${Provider.of<UserModule>(context).user()['name']}${(Provider.of<UserModule>(context).user()['guestName']!=null&&Provider.of<UserModule>(context).user()['guestName']!=''?' - ${Provider.of<UserModule>(context).user()['guestName']}':'')}', style: TextStyle(color: Colors.white, fontSize: 18), overflow: TextOverflow.ellipsis),
|
|
|
SizedBox(height: 10),
|
|
SizedBox(height: 10),
|
|
|
- Container(
|
|
|
|
|
- child: Row(
|
|
|
|
|
- children: [
|
|
|
|
|
- GestureDetector(child: Icon(Icons.info_outline, color: Colors.white, size: 20), onTap: () => showSuccess(context, "scopeDesc".tr()),),
|
|
|
|
|
- SizedBox(width: 8),
|
|
|
|
|
- Text('scope'.tr(), style: TextStyle(color: Colors.white, fontSize: 14)),
|
|
|
|
|
- SizedBox(width: 16),
|
|
|
|
|
- GestureDetector(
|
|
|
|
|
- child: Container(
|
|
|
|
|
- padding: EdgeInsets.fromLTRB(16, 4, 16, 4),
|
|
|
|
|
- decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(50))),
|
|
|
|
|
- child: Row(
|
|
|
|
|
- children: [
|
|
|
|
|
- Text(Provider.of<ServiceModule>(context).scoopeName(), style: TextStyle(color: primaryColor, fontSize: 14)),
|
|
|
|
|
- SizedBox(width: 8),
|
|
|
|
|
- U.iconsax('arrow-down-1', color: primaryColor, size: 14),
|
|
|
|
|
- ],
|
|
|
|
|
- ),
|
|
|
|
|
|
|
+ Row(
|
|
|
|
|
+ children: [
|
|
|
|
|
+ GestureDetector(
|
|
|
|
|
+ child: Icon(Icons.info_outline, color: Colors.white, size: 20),
|
|
|
|
|
+ onTap: () => showSuccess(context, "scopeDesc".tr()),
|
|
|
|
|
+ ).withHover(),
|
|
|
|
|
+ SizedBox(width: 8),
|
|
|
|
|
+ Text('scope'.tr(), style: TextStyle(color: Colors.white, fontSize: 14)),
|
|
|
|
|
+ SizedBox(width: 16),
|
|
|
|
|
+ GestureDetector(
|
|
|
|
|
+ child: Container(
|
|
|
|
|
+ padding: EdgeInsets.fromLTRB(16, 4, 16, 4),
|
|
|
|
|
+ decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(50))),
|
|
|
|
|
+ child: Row(
|
|
|
|
|
+ children: [
|
|
|
|
|
+ Text(Provider.of<ServiceModule>(context).scoopeName(), style: TextStyle(color: primaryColor, fontSize: 14)),
|
|
|
|
|
+ SizedBox(width: 8),
|
|
|
|
|
+ U.iconsax('arrow-down-1', color: primaryColor, size: 14),
|
|
|
|
|
+ ],
|
|
|
),
|
|
),
|
|
|
- onTap: (){
|
|
|
|
|
- if(Provider.of<ServiceModule>(context, listen: false).scoope().isNotEmpty){
|
|
|
|
|
- showDialog(
|
|
|
|
|
- context: context,
|
|
|
|
|
- builder: (contexts) {
|
|
|
|
|
- return AlertDialog(
|
|
|
|
|
- contentPadding: EdgeInsets.symmetric(vertical: 0, horizontal: 10),
|
|
|
|
|
- content: Column(
|
|
|
|
|
- mainAxisSize: MainAxisSize.min,
|
|
|
|
|
- children: [
|
|
|
|
|
- Container(
|
|
|
|
|
- margin: EdgeInsets.symmetric(vertical: 16),
|
|
|
|
|
- child: Text('changeScope'.tr(), style: TextStyle(color: textColor, fontSize: 14), textAlign: TextAlign.center),
|
|
|
|
|
- ),
|
|
|
|
|
- divider(),
|
|
|
|
|
- SizedBox(height: 16),
|
|
|
|
|
- Column(
|
|
|
|
|
- children: List.generate(Provider.of<ServiceModule>(context).getScoopeLength(), (i){
|
|
|
|
|
- return GestureDetector(
|
|
|
|
|
- child: Container(
|
|
|
|
|
- color: Colors.white,
|
|
|
|
|
- padding: EdgeInsets.symmetric(vertical: 16, horizontal: 16),
|
|
|
|
|
- child: Row(
|
|
|
|
|
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
- children: [
|
|
|
|
|
- Text(Provider.of<ServiceModule>(context).scoope()[i]['value'], style: TextStyle(color: textColor, fontSize: 14)),
|
|
|
|
|
- Icon(Provider.of<ServiceModule>(context).checkScoope(Provider.of<ServiceModule>(context).scoope()[i]['key'])?Icons.radio_button_checked:Icons.radio_button_off, color: Provider.of<ServiceModule>(context).checkScoope(Provider.of<ServiceModule>(context).scoope()[i]['key'])?primaryColor:Colors.black45, size: 22),
|
|
|
|
|
- ],
|
|
|
|
|
- ),
|
|
|
|
|
|
|
+ ),
|
|
|
|
|
+ onTap: (){
|
|
|
|
|
+ if(Provider.of<ServiceModule>(context, listen: false).scoope().isNotEmpty){
|
|
|
|
|
+ showDialog(
|
|
|
|
|
+ context: context,
|
|
|
|
|
+ builder: (contexts) {
|
|
|
|
|
+ return AlertDialog(
|
|
|
|
|
+ contentPadding: EdgeInsets.symmetric(vertical: 0, horizontal: 10),
|
|
|
|
|
+ content: Column(
|
|
|
|
|
+ mainAxisSize: MainAxisSize.min,
|
|
|
|
|
+ children: [
|
|
|
|
|
+ Container(
|
|
|
|
|
+ margin: EdgeInsets.symmetric(vertical: 16),
|
|
|
|
|
+ child: Text('changeScope'.tr(), style: TextStyle(color: textColor, fontSize: 14), textAlign: TextAlign.center),
|
|
|
|
|
+ ),
|
|
|
|
|
+ divider(),
|
|
|
|
|
+ SizedBox(height: 16),
|
|
|
|
|
+ Column(
|
|
|
|
|
+ children: List.generate(Provider.of<ServiceModule>(context).getScoopeLength(), (i){
|
|
|
|
|
+ return GestureDetector(
|
|
|
|
|
+ child: Container(
|
|
|
|
|
+ color: Colors.white,
|
|
|
|
|
+ padding: EdgeInsets.symmetric(vertical: 16, horizontal: 16),
|
|
|
|
|
+ child: Row(
|
|
|
|
|
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
+ children: [
|
|
|
|
|
+ Text(Provider.of<ServiceModule>(context).scoope()[i]['value'], style: TextStyle(color: textColor, fontSize: 14)),
|
|
|
|
|
+ Icon(Provider.of<ServiceModule>(context).checkScoope(Provider.of<ServiceModule>(context).scoope()[i]['key'])?Icons.radio_button_checked:Icons.radio_button_off, color: Provider.of<ServiceModule>(context).checkScoope(Provider.of<ServiceModule>(context).scoope()[i]['key'])?primaryColor:Colors.black45, size: 22),
|
|
|
|
|
+ ],
|
|
|
),
|
|
),
|
|
|
- onTap: () async{
|
|
|
|
|
- await sharedPreferencesManager.putString(SharedPreferencesManager.keyScoope, Provider.of<ServiceModule>(context, listen: false).scoope()[i]['key']);
|
|
|
|
|
- Provider.of<ServiceModule>(context, listen: false).setScoopeValue(Provider.of<ServiceModule>(context, listen: false).scoope()[i]['key']);
|
|
|
|
|
- Provider.of<ServiceModule>(context, listen: false).setScoopeName(Provider.of<ServiceModule>(context, listen: false).scoope()[i]['value']);
|
|
|
|
|
- Navigator.of(contexts).pop();
|
|
|
|
|
|
|
+ ),
|
|
|
|
|
+ onTap: () async{
|
|
|
|
|
+ await sharedPreferencesManager.putString(SharedPreferencesManager.keyScoope, Provider.of<ServiceModule>(context, listen: false).scoope()[i]['key']);
|
|
|
|
|
+ Provider.of<ServiceModule>(context, listen: false).setScoopeValue(Provider.of<ServiceModule>(context, listen: false).scoope()[i]['key']);
|
|
|
|
|
+ Provider.of<ServiceModule>(context, listen: false).setScoopeName(Provider.of<ServiceModule>(context, listen: false).scoope()[i]['value']);
|
|
|
|
|
+ Navigator.of(contexts).pop();
|
|
|
|
|
|
|
|
- var profile = Provider.of<UserModule>(context, listen: false).profile();
|
|
|
|
|
- if(profile['topMenu']['show'] != null && profile['topMenu']['show'] == true) {
|
|
|
|
|
- homeFunc.getTopMenuNew();
|
|
|
|
|
- }
|
|
|
|
|
- if(profile['specialOffer'] != null && profile['specialOffer']['show'] == true) homeFunc.getSpecialOffer(context);
|
|
|
|
|
- if(profile['frequentlyRequested'] != null && profile['frequentlyRequested']['show'] == true) homeFunc.getFrequentlyRequested();
|
|
|
|
|
- if(profile['banner'] != null && profile['banner']['show'] == true) homeFunc.getBanner(context);
|
|
|
|
|
- if(profile['quickAction'] != null && profile['quickAction']['show'] == true) homeFunc.getQuickAction(context);
|
|
|
|
|
|
|
+ var profile = Provider.of<UserModule>(context, listen: false).profile();
|
|
|
|
|
+ if(profile['topMenu']['show'] != null && profile['topMenu']['show'] == true) {
|
|
|
|
|
+ homeFunc.getTopMenuNew();
|
|
|
}
|
|
}
|
|
|
- );
|
|
|
|
|
- }),
|
|
|
|
|
- ),
|
|
|
|
|
- SizedBox(height: 16),
|
|
|
|
|
- ],
|
|
|
|
|
- ),
|
|
|
|
|
- );
|
|
|
|
|
- },
|
|
|
|
|
- );
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- )
|
|
|
|
|
- ],
|
|
|
|
|
- ),
|
|
|
|
|
|
|
+ if(profile['specialOffer'] != null && profile['specialOffer']['show'] == true) homeFunc.getSpecialOffer(context);
|
|
|
|
|
+ if(profile['frequentlyRequested'] != null && profile['frequentlyRequested']['show'] == true) homeFunc.getFrequentlyRequested();
|
|
|
|
|
+ if(profile['banner'] != null && profile['banner']['show'] == true) homeFunc.getBanner(context);
|
|
|
|
|
+ if(profile['quickAction'] != null && profile['quickAction']['show'] == true) homeFunc.getQuickAction(context);
|
|
|
|
|
+ }
|
|
|
|
|
+ ).withHover();
|
|
|
|
|
+ }),
|
|
|
|
|
+ ),
|
|
|
|
|
+ SizedBox(height: 16),
|
|
|
|
|
+ ],
|
|
|
|
|
+ ),
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ ).withHover()
|
|
|
|
|
+ ],
|
|
|
),
|
|
),
|
|
|
],
|
|
],
|
|
|
)
|
|
)
|
|
@@ -369,7 +345,7 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
val = val??true;
|
|
val = val??true;
|
|
|
if(val) homeFunc.getFrequentlyRequested();
|
|
if(val) homeFunc.getFrequentlyRequested();
|
|
|
}),
|
|
}),
|
|
|
- ),
|
|
|
|
|
|
|
+ ).withHover(),
|
|
|
),
|
|
),
|
|
|
) : Container(),
|
|
) : Container(),
|
|
|
):Container(),
|
|
):Container(),
|
|
@@ -434,7 +410,7 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- ),
|
|
|
|
|
|
|
+ ).withHover(),
|
|
|
),
|
|
),
|
|
|
);
|
|
);
|
|
|
}),
|
|
}),
|
|
@@ -442,8 +418,10 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
Provider.of<UserModule>(context).user()['checkedIn'] && Provider.of<UserModule>(context).houseKeeping() && Provider.of<UserModule>(context).dndStatus() ? GestureDetector(
|
|
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))),
|
|
|
child: Container(
|
|
child: Container(
|
|
|
padding: EdgeInsets.all(10),
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
+ decoration: BoxDecoration(color: Color(0xffD81010).withValues(alpha: 0.15), borderRadius: BorderRadius.all(Radius.circular(10)), border: Border.all(color: Color(0xffD81010))),
|
|
|
child: Column(
|
|
child: Column(
|
|
|
children: [
|
|
children: [
|
|
|
Icon(Icons.remove_circle, color: Color(0xffD81010), size: 18),
|
|
Icon(Icons.remove_circle, color: Color(0xffD81010), size: 18),
|
|
@@ -451,9 +429,7 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
Text('info_dnd'.tr(), style: TextStyle(color: textColor, fontSize: 14))
|
|
Text('info_dnd'.tr(), style: TextStyle(color: textColor, fontSize: 14))
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
- decoration: BoxDecoration(color: Color(0xffD81010).withValues(alpha: 0.15), borderRadius: BorderRadius.all(Radius.circular(10)), border: Border.all(color: Color(0xffD81010))),
|
|
|
|
|
),
|
|
),
|
|
|
- decoration: BoxDecoration(border: Border(left: BorderSide(color: Colors.grey))),
|
|
|
|
|
),
|
|
),
|
|
|
onTap: (){
|
|
onTap: (){
|
|
|
showDialog(
|
|
showDialog(
|
|
@@ -463,7 +439,7 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
),
|
|
),
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
- ) : Container()
|
|
|
|
|
|
|
+ ).withHover() : Container()
|
|
|
],
|
|
],
|
|
|
);
|
|
);
|
|
|
},
|
|
},
|
|
@@ -477,14 +453,14 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
child: Container(
|
|
child: Container(
|
|
|
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 4),
|
|
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 4),
|
|
|
margin: EdgeInsets.only(right: 30),
|
|
margin: EdgeInsets.only(right: 30),
|
|
|
- child: Text('customize'.tr(), style: TextStyle(color: primaryColor, fontSize: 14)),
|
|
|
|
|
decoration: BoxDecoration(
|
|
decoration: BoxDecoration(
|
|
|
color: primaryColor.withValues(alpha: 0.1),
|
|
color: primaryColor.withValues(alpha: 0.1),
|
|
|
borderRadius: BorderRadius.all(Radius.circular(50))
|
|
borderRadius: BorderRadius.all(Radius.circular(50))
|
|
|
),
|
|
),
|
|
|
|
|
+ child: Text('customize'.tr(), style: TextStyle(color: primaryColor, fontSize: 14)),
|
|
|
),
|
|
),
|
|
|
onTap: ()=>navigateTo(context, WebMenuEditorPage(scope: Provider.of<ServiceModule>(context, listen: false).scoopeValue())),
|
|
onTap: ()=>navigateTo(context, WebMenuEditorPage(scope: Provider.of<ServiceModule>(context, listen: false).scoopeValue())),
|
|
|
- ),
|
|
|
|
|
|
|
+ ).withHover(),
|
|
|
),
|
|
),
|
|
|
SizedBox(height: 20),
|
|
SizedBox(height: 20),
|
|
|
LayoutBuilder(
|
|
LayoutBuilder(
|
|
@@ -525,7 +501,7 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
if(val) homeFunc.getFrequentlyRequested();
|
|
if(val) homeFunc.getFrequentlyRequested();
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- ),
|
|
|
|
|
|
|
+ ).withHover(),
|
|
|
),
|
|
),
|
|
|
);
|
|
);
|
|
|
}),
|
|
}),
|
|
@@ -560,6 +536,7 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
constraints: BoxConstraints(minWidth: minWidth, minHeight: minHeight),
|
|
constraints: BoxConstraints(minWidth: minWidth, minHeight: minHeight),
|
|
|
child: Container(
|
|
child: Container(
|
|
|
width: size, height: size*1.4,
|
|
width: size, height: size*1.4,
|
|
|
|
|
+ decoration: BoxDecoration(color: Colors.white, border: Border.all(color: textColor.withValues(alpha: 0.15)), borderRadius: BorderRadius.all(Radius.circular(12))),
|
|
|
child: Column(
|
|
child: Column(
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
children: [
|
|
children: [
|
|
@@ -578,11 +555,10 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
)
|
|
)
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
- decoration: BoxDecoration(color: Colors.white, border: Border.all(color: textColor.withValues(alpha: 0.15)), borderRadius: BorderRadius.all(Radius.circular(12))),
|
|
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
|
onTap: ()=>navigateTo(context, WebReqCreatePage(user: Provider.of<UserModule>(context, listen: false).user(), request: Provider.of<ServiceModule>(context, listen: false).specialOffer()[i])),
|
|
onTap: ()=>navigateTo(context, WebReqCreatePage(user: Provider.of<UserModule>(context, listen: false).user(), request: Provider.of<ServiceModule>(context, listen: false).specialOffer()[i])),
|
|
|
- )),
|
|
|
|
|
|
|
+ ).withHover()),
|
|
|
);
|
|
);
|
|
|
},
|
|
},
|
|
|
) : emptyWidget()
|
|
) : emptyWidget()
|
|
@@ -612,6 +588,7 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
constraints: BoxConstraints(minWidth: minWidth, minHeight: minHeight),
|
|
constraints: BoxConstraints(minWidth: minWidth, minHeight: minHeight),
|
|
|
child: Container(
|
|
child: Container(
|
|
|
width: size, height: size*1.2,
|
|
width: size, height: size*1.2,
|
|
|
|
|
+ decoration: BoxDecoration(color: Colors.white, border: Border.all(color: textColor.withValues(alpha: 0.15)), borderRadius: BorderRadius.all(Radius.circular(12))),
|
|
|
child: Column(
|
|
child: Column(
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
children: [
|
|
children: [
|
|
@@ -629,14 +606,13 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
)
|
|
)
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
- decoration: BoxDecoration(color: Colors.white, border: Border.all(color: textColor.withValues(alpha: 0.15)), borderRadius: BorderRadius.all(Radius.circular(12))),
|
|
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
|
onTap: ()=>navigateTo(context, WebReqCreatePage(user: Provider.of<UserModule>(context, listen: false).user(), request: Provider.of<ServiceModule>(context, listen: false).data()[i])).then((val){
|
|
onTap: ()=>navigateTo(context, WebReqCreatePage(user: Provider.of<UserModule>(context, listen: false).user(), request: Provider.of<ServiceModule>(context, listen: false).data()[i])).then((val){
|
|
|
val = val??true;
|
|
val = val??true;
|
|
|
if(val) homeFunc.getFrequentlyRequested();
|
|
if(val) homeFunc.getFrequentlyRequested();
|
|
|
}),
|
|
}),
|
|
|
- );
|
|
|
|
|
|
|
+ ).withHover();
|
|
|
}),
|
|
}),
|
|
|
);
|
|
);
|
|
|
},
|
|
},
|
|
@@ -662,7 +638,12 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
children: List.generate(Provider.of<ServiceModule>(context).quickAct().length, (i) {
|
|
children: List.generate(Provider.of<ServiceModule>(context).quickAct().length, (i) {
|
|
|
return GestureDetector(
|
|
return GestureDetector(
|
|
|
child: Container(
|
|
child: Container(
|
|
|
- width: size, child: Row(
|
|
|
|
|
|
|
+ width: size,
|
|
|
|
|
+ decoration: BoxDecoration(
|
|
|
|
|
+ color: Colors.white,
|
|
|
|
|
+ border: Border.all(color: textColor.withValues(alpha: 0.15)),
|
|
|
|
|
+ borderRadius: BorderRadius.all(Radius.circular(12))
|
|
|
|
|
+ ), child: Row(
|
|
|
children: [
|
|
children: [
|
|
|
imageTiles(imageUrl: Provider.of<ServiceModule>(context).quickAct()[i]['_mobileImage'] ?? "null", width: 110, height: 90),
|
|
imageTiles(imageUrl: Provider.of<ServiceModule>(context).quickAct()[i]['_mobileImage'] ?? "null", width: 110, height: 90),
|
|
|
SizedBox(width: 20),
|
|
SizedBox(width: 20),
|
|
@@ -679,14 +660,9 @@ class _WebHomePageState extends State<WebHomePage> {
|
|
|
Padding(padding: EdgeInsets.symmetric(horizontal: 20), child: U.iconsax('arrow-right-3', size: 16, color: textColor.withValues(alpha: 0.75)))
|
|
Padding(padding: EdgeInsets.symmetric(horizontal: 20), child: U.iconsax('arrow-right-3', size: 16, color: textColor.withValues(alpha: 0.75)))
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
- decoration: BoxDecoration(
|
|
|
|
|
- color: Colors.white,
|
|
|
|
|
- border: Border.all(color: textColor.withValues(alpha: 0.15)),
|
|
|
|
|
- borderRadius: BorderRadius.all(Radius.circular(12))
|
|
|
|
|
- ),
|
|
|
|
|
),
|
|
),
|
|
|
onTap: ()=>navigateTo(context, WebReqCreatePage(user: Provider.of<UserModule>(context, listen: false).user(), request: Provider.of<ServiceModule>(context, listen: false).quickAct()[i])),
|
|
onTap: ()=>navigateTo(context, WebReqCreatePage(user: Provider.of<UserModule>(context, listen: false).user(), request: Provider.of<ServiceModule>(context, listen: false).quickAct()[i])),
|
|
|
- );
|
|
|
|
|
|
|
+ ).withHover();
|
|
|
}),
|
|
}),
|
|
|
);
|
|
);
|
|
|
},
|
|
},
|
|
@@ -754,7 +730,7 @@ class _WebMenuEditorPageState extends State<WebMenuEditorPage> {
|
|
|
GestureDetector(
|
|
GestureDetector(
|
|
|
child: Text('buttonBack'.tr(), style: TextStyle(color: primaryColor, fontSize: 14)),
|
|
child: Text('buttonBack'.tr(), style: TextStyle(color: primaryColor, fontSize: 14)),
|
|
|
onTap: ()=>navigateBack(context),
|
|
onTap: ()=>navigateBack(context),
|
|
|
- )
|
|
|
|
|
|
|
+ ).withHover()
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
@@ -812,7 +788,7 @@ class _WebMenuEditorPageState extends State<WebMenuEditorPage> {
|
|
|
data.remove(data[i]);
|
|
data.remove(data[i]);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- ),
|
|
|
|
|
|
|
+ ).withHover(),
|
|
|
SizedBox(width: 40)
|
|
SizedBox(width: 40)
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
@@ -874,7 +850,7 @@ class _WebMenuEditorPageState extends State<WebMenuEditorPage> {
|
|
|
showError(context, 'maxMenu'.tr());
|
|
showError(context, 'maxMenu'.tr());
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- ),
|
|
|
|
|
|
|
+ ).withHover(),
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
);
|
|
);
|
|
@@ -926,13 +902,16 @@ class _WebMenuEditorPageState extends State<WebMenuEditorPage> {
|
|
|
imageContainer(iconUrl){
|
|
imageContainer(iconUrl){
|
|
|
return Container(
|
|
return Container(
|
|
|
padding: EdgeInsets.all(5),
|
|
padding: EdgeInsets.all(5),
|
|
|
- child: Image(image: CachedNetworkImageProvider(iconUrl+'?bridge-cache=true', cacheManager: CacheManager(CacheMan.config(iconUrl+'?bridge-cache=true'))), width: 50, height: 50),
|
|
|
|
|
decoration: BoxDecoration(
|
|
decoration: BoxDecoration(
|
|
|
color: Colors.white,
|
|
color: Colors.white,
|
|
|
borderRadius: BorderRadius.all(Radius.circular(12)),
|
|
borderRadius: BorderRadius.all(Radius.circular(12)),
|
|
|
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(iconUrl+'?bridge-cache=true', cacheManager: CacheManager(CacheMan.config(iconUrl+'?bridge-cache=true'))),
|
|
|
|
|
+ width: 50, height: 50
|
|
|
|
|
+ ),
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|