Browse Source

before push

Yulian 2 days ago
parent
commit
9e1f99d2b8

+ 4 - 7
lib/src/layouts/components/responsive.dart

@@ -1,9 +1,6 @@
 import 'package:auto_route/auto_route.dart';
 import 'package:flutter/material.dart';
 import 'package:telnow_mobile_new/src/layouts/mobile/app_mobile.dart';
-import 'package:telnow_mobile_new/src/layouts/mobile/menu_account.dart';
-import 'package:telnow_mobile_new/src/layouts/mobile/menu_history.dart';
-import 'package:telnow_mobile_new/src/layouts/mobile/menu_home.dart';
 import 'package:telnow_mobile_new/src/layouts/web/app_web.dart';
 import 'package:telnow_mobile_new/src/layouts/web/menu_account.dart';
 import 'package:telnow_mobile_new/src/layouts/web/menu_history.dart';
@@ -16,7 +13,7 @@ class AppResponsive extends StatelessWidget {
 
   @override
   Widget build(BuildContext context) {
-    return U.webView(context)?WebAppPage(AutoRouter()):MobAppPage(AutoRouter());
+    return U.webView(context) ? WebAppPage(AutoRouter()) : MobAppPage(AutoRouter());
   }
 }
 
@@ -26,7 +23,7 @@ class HomeResponsive extends StatelessWidget {
 
   @override
   Widget build(BuildContext context) {
-    return U.webView(context)?WebHomePage():MobMenuTemplate(child: MobHomePage());
+    return U.webView(context) ? WebHomePage() : MobMenuTemplate();
   }
 }
 
@@ -36,7 +33,7 @@ class HistoryResponsive extends StatelessWidget {
 
   @override
   Widget build(BuildContext context) {
-    return U.webView(context)?WebHistoryPage():MobMenuTemplate(child: MobHistoryPage());
+    return U.webView(context) ? WebHistoryPage() : MobMenuTemplate();
   }
 }
 
@@ -46,7 +43,7 @@ class AccountResponsive extends StatelessWidget {
 
   @override
   Widget build(BuildContext context) {
-    return U.webView(context)?WebAccountPage():MobMenuTemplate(child: MobAccountPage());
+    return U.webView(context) ? WebAccountPage() : MobMenuTemplate();
   }
 }
 

+ 2 - 2
lib/src/layouts/components/template.dart

@@ -94,10 +94,10 @@ Widget textHorizontal(String title, String subtitle, {double size = 14, double o
   );
 }
 
-Widget divider({opacity = 0.15, EdgeInsetsGeometry padding = const EdgeInsets.only(top: 0)}){
+Widget divider({double opacity = 0.15, EdgeInsetsGeometry padding = const EdgeInsets.only(top: 0), Color color = textColor, thickness = 1.0}){
   return Padding(
     padding: padding,
-    child: Divider(height: 1, thickness: 1, color: textColor.withValues(alpha: opacity)),
+    child: Divider(height: 1, thickness: thickness, color: color.withValues(alpha: opacity)),
   );
 }
 

+ 3 - 4
lib/src/layouts/functions/detail.dart

@@ -90,11 +90,10 @@ class DetailFunction{
         };
 
         var res = await apiAuthProvider.postData('/api/requestHistories/search/request/cancel/${list['ticketNo']}', null, data);
-        if(res != null){
+        if(res != null && context.mounted){
           UIService.closeLoading();
-          UIService.navigateBack(exc: true);
-        }
-        else{
+          navigateBack(context, exc: true);
+        } else {
           UIService.closeLoading();
         }
       });

+ 9 - 9
lib/src/layouts/functions/home.dart

@@ -77,11 +77,11 @@ class HomeFunction{
         var profile = userModule.profile();
         if(profile['topMenu']['show'] != null && profile['topMenu']['show'] == true) {
           if(U.newServerVersion(1709864293)){
-            getTopMenuNew(context);
+            getTopMenuNew();
           }
           else{
-            getTopMenu(context);
-            getReqGroup(context);
+            getTopMenu();
+            getReqGroup();
           }
         }
         if(profile['specialOffer'] != null && profile['specialOffer']['show'] == true) getSpecialOffer(context);
@@ -121,7 +121,7 @@ class HomeFunction{
     }
   }
 
-  getTopMenuNew(BuildContext context) async {
+  getTopMenuNew() async {
     try {
       var url = '/api/requestGroups/search/dashboard/topMenu/'+serviceModule.scoopeValue();
 
@@ -144,7 +144,7 @@ class HomeFunction{
     }
   }
 
-  getTopMenu(BuildContext context) async {
+  getTopMenu() async {
     try {
       var url = '/api/requestGroups/search/topMenu/'+serviceModule.scoopeValue();
 
@@ -175,7 +175,7 @@ class HomeFunction{
     }
   }
 
-  getReqGroup(BuildContext context) async {
+  getReqGroup() async {
     try {
       var url = '/api/requestGroups/search/excludeTopMenu/'+serviceModule.scoopeValue();
 
@@ -329,11 +329,11 @@ class HomeFunction{
     var profile = userModule.profile();
     if(profile['topMenu']['show'] != null && profile['topMenu']['show'] == true) {
       if(U.newServerVersion(1709864293)){
-        getTopMenuNew(context);
+        getTopMenuNew();
       }
       else{
-        getTopMenu(context);
-        getReqGroup(context);
+        getTopMenu();
+        getReqGroup();
       }
     }
     if(profile['specialOffer'] != null && profile['specialOffer']['show'] == true) getSpecialOffer(context);

+ 3 - 1
lib/src/layouts/functions/request.dart

@@ -19,6 +19,7 @@ import 'package:telnow_mobile_new/src/utils/cache_manager.dart';
 import 'package:telnow_mobile_new/src/utils/provider.dart';
 
 import 'package:image/image.dart' as img;
+import 'package:telnow_mobile_new/src/utils/ui_service.dart';
 import 'package:uuid/uuid.dart';
 
 class RequestFunction{
@@ -145,7 +146,8 @@ class RequestFunction{
   }
 
   sendRequest(BuildContext context, widget, controllerNote, controllerReferenceNumber, controllerLocation, controllerDateString, currentSliderValue) async{
-    showLoading(context, lottie: kIsWeb && !isCanvasKit ? null : 'Paperplane.json', text: 'sendingRequest'.tr());
+    // showLoading(context, lottie: kIsWeb && !isCanvasKit ? null : 'Paperplane.json', text: 'sendingRequest'.tr());
+    UIService.showLoading(text: 'sendingRequest'.tr(), lottie: kIsWeb && !isCanvasKit ? null : 'Paperplane.json' );
     var data;
     data = {
       'note': controllerNote.text.trim() == '' ? '' : controllerNote.text.trim(),

+ 20 - 5
lib/src/layouts/mobile/app_mobile.dart

@@ -6,11 +6,15 @@ import 'package:easy_localization/easy_localization.dart';
 import 'package:firebase_messaging/firebase_messaging.dart';
 import 'package:flutter/foundation.dart';
 import 'package:flutter/material.dart';
+import 'package:lazy_load_indexed_stack/lazy_load_indexed_stack.dart';
 import 'package:quick_notify_2/quick_notify.dart';
 import 'package:simple_connection_checker/simple_connection_checker.dart';
 import 'package:telnow_mobile_new/main.dart';
 import 'package:telnow_mobile_new/src/injector/injector.dart';
 import 'package:telnow_mobile_new/src/layouts/components/template.dart';
+import 'package:telnow_mobile_new/src/layouts/mobile/menu_account.dart';
+import 'package:telnow_mobile_new/src/layouts/mobile/menu_history.dart';
+import 'package:telnow_mobile_new/src/layouts/mobile/menu_home.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/ui_service.dart';
@@ -125,8 +129,8 @@ class _MobAppPageState extends State<MobAppPage>with TickerProviderStateMixin {
 //---------------------------------------------------------------------------------------------------------------
 
 class MobMenuTemplate extends StatefulWidget {
-  final Widget child;
-  const MobMenuTemplate({required this.child, Key? key}) : super(key: key);
+  // final Widget child;
+  const MobMenuTemplate({super.key});
 
   @override
   State<MobMenuTemplate> createState() => _MobMenuTemplateState();
@@ -157,6 +161,17 @@ class _MobMenuTemplateState extends State<MobMenuTemplate> {
     });
   }
 
+  indexedStack(index){
+    return LazyLoadIndexedStack(
+      index: index,
+      children: [
+        MobHomePage(),
+        MobHistoryPage(),
+        MobAccountPage()
+      ],
+    );
+  }
+
   @override
   void initState() {
     getUser();
@@ -176,10 +191,10 @@ class _MobMenuTemplateState extends State<MobMenuTemplate> {
 
     return Scaffold(
       backgroundColor: backgroundColor,
-      body: !kIsWeb?DoubleBackToExit(
+      body: !kIsWeb ? DoubleBackToExit(
         snackBarMessage: 'pressAgain'.tr(),
-        child: widget.child,
-      ):widget.child,
+        child: indexedStack(index)
+      ) : indexedStack(index),
       bottomNavigationBar: BottomNavigationBar(
         backgroundColor: Colors.white,
         selectedItemColor: textColor,

+ 1 - 1
lib/src/layouts/mobile/history_detail.dart

@@ -328,7 +328,7 @@ class _MobHistoryDetailPageState extends State<MobHistoryDetailPage> {
                 ),
               ):_timeLimit ? showButton(context) : loadingTemplate(() {if(mounted) setState(()=>_timeLimit=true);},),
             ),
-            divider(),
+            divider(color: primaryColor, opacity: 1.0, thickness: 2.0),
             list.isEmpty || list['autoResponse'] || list['currentState'] == 'DISELESAIKAN' || list['currentState'] == 'TUNTAS' || list['currentState'] == 'DIBATALKAN' ? Container() : Container(
               padding: EdgeInsets.symmetric(vertical: 10, horizontal: 16), color: Colors.white,
               child: list['currentState'] == 'DIMULAI' && list['_canNotCancel'] ? Text('canNotCancel2'.tr(), style: TextStyle(color: textColor, fontSize: 14), textAlign: TextAlign.center) : Container(

+ 1 - 1
lib/src/layouts/mobile/menu_account.dart

@@ -36,7 +36,7 @@ class _MobAccountPageState extends State<MobAccountPage> {
 
   @override
   void initState() {
-    Provider.of<UserModule>(context, listen: false).reset();
+    // Provider.of<UserModule>(context, listen: false).reset();
 
     accFunc.getUser(context);
     setToggle();

+ 63 - 42
lib/src/layouts/mobile/menu_home.dart

@@ -22,6 +22,7 @@ import 'package:telnow_mobile_new/src/utils/C.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/provider.dart';
+import 'package:telnow_mobile_new/src/utils/ui_service.dart';
 import 'package:url_launcher/url_launcher.dart';
 
 class MobHomePage extends StatefulWidget {
@@ -33,14 +34,18 @@ class MobHomePage extends StatefulWidget {
 
 class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
   final HomeFunction homeFunc = HomeFunction();
+
   final SharedPreferencesManager sharedPreferencesManager = locator<SharedPreferencesManager>();
   bool _timeLimit = false;
   String _localeIndex = 'id';
 
+  late final ServiceModule serviceModule = homeFunc.serviceModule;
+  late final UserModule userModule = homeFunc.userModule;
+
   @override
   void initState() {
-    Provider.of<ServiceModule>(context, listen: false).reset();
-    Provider.of<UserModule>(context, listen: false).reset();
+    // serviceModule.reset();
+    // userModule.reset();
 
     WidgetsBinding.instance.addPostFrameCallback((_) {
       Future.delayed(Duration(seconds: 1), (){
@@ -74,8 +79,27 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
 
   @override
   Widget build(BuildContext context) {
+    final UserModule userModuleListen = Provider.of<UserModule>(context);
+    final ServiceModule serviceModuleListen = Provider.of<ServiceModule>(context);
+    String name = userModuleListen.user()['name'] ?? '';
+    String searchText = 'searchAsk'.tr();
+    bool showTopMenu = false;
+
+    if(userModuleListen.user()['guestName'] != null && userModuleListen.user()['guestName'] != ''){
+      name = '$name ${userModuleListen.user()['guestName']}';
+    }
+
+    if(userModuleListen.profile()['searchText'] != null && userModuleListen.profile()['searchText'][context.locale.toString()] != ''){
+      searchText = userModuleListen.profile()['searchText'][context.locale.toString()];
+    }
+
+    if(userModuleListen.profile()['topMenu'] != null && userModuleListen.profile()['topMenu']['show'] == true) {
+      showTopMenu = true;
+    }
+
     _localeIndex = U.newServerVersion(1754624839) ? U.getLangIndex(context.locale.toString()) : context.locale.toString();
-    return Provider.of<UserModule>(context).user().isNotEmpty?Scaffold(
+
+    return userModuleListen.user().isNotEmpty ? Scaffold(
       backgroundColor: backgroundColor,
       body: Column(
         children: [
@@ -90,7 +114,7 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                   Row(
                     mainAxisAlignment: MainAxisAlignment.spaceBetween,
                     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(name, style: TextStyle(color: Colors.white, fontSize: 18), overflow: TextOverflow.ellipsis),
                       Row(
                         children: [
                           //TODO: tambah pengecekan server version disini
@@ -98,42 +122,35 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                             future: U.isCompatibleWith(VersionKey.multiBahasa),
                             builder: (context, snapshot) {
                               if (!snapshot.hasData) {
-                                return SizedBox(); // or a loading spinner
+                                return SizedBox();
                               }
 
                               final isCompatible = snapshot.data!;
-                              final hasContactCenter = Provider.of<ServiceModule>(context, listen: false)
-                                  .contactCenter()
-                                  .toString()
-                                  .isNotEmpty;
+                              final hasContactCenter = serviceModule.contactCenter().toString().isNotEmpty;
 
                               if (isCompatible && hasContactCenter) {
                                 return GestureDetector(
-                                    onTap: () => launchUrl(Uri.parse(Provider.of<ServiceModule>(context, listen: false).contactCenter().toString())),
+                                    onTap: () => launchUrl(Uri.parse(serviceModule.contactCenter().toString())),
                                     child: U.iconsax('phone-number', color: Colors.white, 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() != ''  ? GestureDetector(
-                          //   onTap: () => launchUrl(Uri.parse(Provider.of<ServiceModule>(context, listen: false).contactCenter().toString())),
-                          //   child: U.iconsax('phone-number', color: Colors.white, size: 26.0)
-                          // ):SizedBox(),
                           SizedBox(width: 8),
                           GestureDetector(
                             child: Stack(
                               alignment: Alignment.topRight,
                               children: [
                                 U.iconsax('sms-notification', color: Colors.white, size: 32.0),
-                                Provider.of<ServiceModule>(context).unreadMessage() ? Container(
+                                serviceModuleListen.unreadMessage() ? Container(
                                   width: 13, height: 13, margin: EdgeInsets.only(top: 1.3),
                                   decoration: BoxDecoration(color: Colors.red, borderRadius: BorderRadius.all(Radius.circular(50))),
                                 ):Container()
                               ],
                             ),
-                            onTap: ()=>navigateTo(context, MobMessageListPage(Provider.of<UserModule>(context, listen: false).user())).then((_){
+                            onTap: () => navigateTo(context, MobMessageListPage(userModule.user())).then((_){
                               homeFunc.getUnreadMessages(context);
                             }),
                           )
@@ -141,7 +158,9 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                       )
                     ],
                   ),
-                  Provider.of<UserModule>(context).profile()['greeting'][context.locale.toString()] != null ? Text(Provider.of<UserModule>(context).profile()['greeting'][context.locale.toString()], style: TextStyle(color: Colors.white, fontSize: 14), overflow: TextOverflow.ellipsis) : Container(),
+                  if(userModuleListen.profile()['greeting'] != null && userModuleListen.profile()['greeting'][context.locale.toString()] != null)
+                      Text(userModuleListen.profile()['greeting'][context.locale.toString()], style: TextStyle(color: Colors.white, fontSize: 14), overflow: TextOverflow.ellipsis),
+                      // : Container(),
                   SizedBox(height: 8),
                   Row(
                     children: [
@@ -157,11 +176,11 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                               children: [
                                 U.iconsax('search-normal-1', color: textColor),
                                 SizedBox(width: 13),
-                                Expanded(child: Text(Provider.of<UserModule>(context).profile()['searchText'][context.locale.toString()] ?? 'searchAsk'.tr(), style: TextStyle(color: textColor.withValues(alpha: 0.5), fontSize: 14), overflow: TextOverflow.ellipsis))
+                                Expanded(child: Text(searchText, style: TextStyle(color: textColor.withValues(alpha: 0.5), fontSize: 14), overflow: TextOverflow.ellipsis))
                               ],
                             ),
                           ),
-                          onTap: () => navigateTo(context, MobReqSelectPage(user: Provider.of<UserModule>(context, listen: false).user(), title: 'search'.tr(), scope: Provider.of<ServiceModule>(context, listen: false).scoopeValue(), placeholder: Provider.of<UserModule>(context, listen: false).profile()['searchText'][context.locale.toString()] ?? 'searchAsk'.tr())).then((val){
+                          onTap: () => navigateTo(context, MobReqSelectPage(user: userModule.user(), title: 'search'.tr(), scope: serviceModule.scoopeValue(), placeholder: userModule.profile()['searchText'][context.locale.toString()] ?? 'searchAsk'.tr())).then((val){
                             val = val??true;
                             if(val) homeFunc.getFrequentlyRequested();
                           }),
@@ -197,20 +216,20 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                             GestureDetector(
                               child: Container(
                                 padding: EdgeInsets.fromLTRB(16, 4, 16, 4),
+                                decoration: BoxDecoration(
+                                    color: primaryColor.withValues(alpha: 0.1),
+                                    borderRadius: BorderRadius.all(Radius.circular(50))
+                                ),
                                 child: Row(
                                   children: [
-                                    Text(Provider.of<ServiceModule>(context).scoopeName(), style: TextStyle(color: primaryColor, fontSize: 14)),
+                                    Text(serviceModuleListen.scoopeName(), style: TextStyle(color: primaryColor, fontSize: 14)),
                                     SizedBox(width: 8),
                                     U.iconsax('arrow-down-1', color: primaryColor, size: 14),
                                   ],
                                 ),
-                                decoration: BoxDecoration(
-                                    color: primaryColor.withValues(alpha: 0.1),
-                                    borderRadius: BorderRadius.all(Radius.circular(50))
-                                ),
                               ),
                               onTap: (){
-                                if(Provider.of<ServiceModule>(context, listen: false).scoope().isNotEmpty){
+                                if(serviceModule.scoope().isNotEmpty){
                                   showModalBottomSheet<void>(
                                     context: context,
                                     backgroundColor: Colors.white,
@@ -226,7 +245,7 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                                             divider(),
                                             SizedBox(height: 16),
                                             Column(
-                                              children: List.generate(Provider.of<ServiceModule>(context).getScoopeLength(), (i){
+                                              children: List.generate(serviceModuleListen.getScoopeLength(), (i){
                                                 return GestureDetector(
                                                     child: Container(
                                                       color: Colors.white,
@@ -234,25 +253,27 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                                                       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),
+                                                          Text(serviceModuleListen.scoope()[i]['value'], style: TextStyle(color: textColor, fontSize: 14)),
+                                                          Icon(serviceModuleListen.checkScoope(serviceModuleListen.scoope()[i]['key'])?Icons.radio_button_checked:Icons.radio_button_off, color: serviceModuleListen.checkScoope(serviceModuleListen.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();
+                                                      final nav = Navigator.of(contexts);
+
+                                                      await sharedPreferencesManager.putString(SharedPreferencesManager.keyScoope, serviceModule.scoope()[i]['key']);
+                                                      serviceModule.setScoopeValue(serviceModule.scoope()[i]['key']);
+                                                      serviceModule.setScoopeName(serviceModule.scoope()[i]['value']);
+                                                      nav.pop();
                                         
-                                                      var profile = Provider.of<UserModule>(context, listen: false).profile();
+                                                      var profile = userModule.profile();
                                                       if(profile['topMenu']['show'] != null && profile['topMenu']['show'] == true) {
                                                         if(U.newServerVersion(1709864293)){
-                                                          homeFunc.getTopMenuNew(context);
+                                                          homeFunc.getTopMenuNew();
                                                         }
                                                         else{
-                                                          homeFunc.getTopMenu(context);
-                                                          homeFunc.getReqGroup(context);
+                                                          homeFunc.getTopMenu();
+                                                          homeFunc.getReqGroup();
                                                         }
                                                       }
                                                       if(profile['specialOffer'] != null && profile['specialOffer']['show'] == true) homeFunc.getSpecialOffer(context);
@@ -275,7 +296,7 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                           ],
                         ),
                       ),
-                      Provider.of<UserModule>(context).profile()['topMenu']['show'] != null && Provider.of<UserModule>(context).profile()['topMenu']['show'] == true ? Container(
+                      if(showTopMenu) Container(
                         margin: EdgeInsets.symmetric(horizontal: 16),
                         child: Provider.of<ServiceModule>(context).topMenu() != null && Provider.of<ServiceModule>(context).reqGroup() != null?Column(
                           children: List.generate(((Provider.of<ServiceModule>(context).topMenu()!.length+1)/4).ceil(), (i){
@@ -327,7 +348,7 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                             );
                           }),
                         ):shimmerTopMenu(context),
-                      ):Container(),
+                      ),
 
                       Provider.of<UserModule>(context).profile()['specialOffer'] != null && Provider.of<UserModule>(context).profile()['specialOffer']['show'] == true ? Container(
                         margin: EdgeInsets.only(top: 36),
@@ -482,12 +503,12 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
                                           decoration: BoxDecoration(
                                             color: textColor.withValues(alpha: 0.1),
                                             borderRadius: BorderRadius.all(Radius.circular(12)),
-                                            image: Provider.of<ServiceModule>(context).banner()[i]['image'] != null ? DecorationImage(
-                                              image: CachedNetworkImageProvider(Provider.of<ServiceModule>(context).banner()[i]['image']+'?bridge-cache=true', cacheManager: CacheManager(CacheMan.config(Provider.of<ServiceModule>(context).banner()[i]['image']))),
+                                            image: serviceModule.banner()[i]['image'] != null ? DecorationImage(
+                                              image: CachedNetworkImageProvider(Provider.of<ServiceModule>(context).banner()[i]['image']+'?bridge-cache=true', cacheManager: CacheManager(CacheMan.config(serviceModule.banner()[i]['image']))),
                                               fit: BoxFit.cover,
                                             ):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)),
+                                          child: serviceModule.banner()[i]['image'] != null ? null : Center(child: Text("noImage".tr(), style: TextStyle(fontStyle: FontStyle.italic, color: Colors.black38), textAlign: TextAlign.center)),
                                         ),
                                       ),
                                       Container(

+ 1 - 1
lib/src/layouts/mobile/request_create.dart

@@ -508,7 +508,7 @@ class _MobReqCreatePageState extends State<MobReqCreatePage> {
               ),
             ),
           ),
-          divider(),
+          divider(color: primaryColor, thickness: 2.0, opacity: 1.0),
           Container(
             alignment: Alignment.bottomCenter,
             width: U.bodyWidth(context), color: Colors.white,

+ 3 - 3
lib/src/layouts/web/menu_home.dart

@@ -255,11 +255,11 @@ class _WebHomePageState extends State<WebHomePage> {
                                                     var profile = Provider.of<UserModule>(context, listen: false).profile();
                                                     if(profile['topMenu']['show'] != null && profile['topMenu']['show'] == true) {
                                                       if(U.newServerVersion(1709864293)){
-                                                        homeFunc.getTopMenuNew(context);
+                                                        homeFunc.getTopMenuNew();
                                                       }
                                                       else{
-                                                        homeFunc.getTopMenu(context);
-                                                        homeFunc.getReqGroup(context);
+                                                        homeFunc.getTopMenu();
+                                                        homeFunc.getReqGroup();
                                                       }
                                                     }
                                                     if(profile['specialOffer'] != null && profile['specialOffer']['show'] == true) homeFunc.getSpecialOffer(context);

+ 8 - 0
pubspec.lock

@@ -949,6 +949,14 @@ packages:
       url: "https://pub.dev"
     source: hosted
     version: "2.0.1"
+  lazy_load_indexed_stack:
+    dependency: "direct main"
+    description:
+      name: lazy_load_indexed_stack
+      sha256: "6026d0f1753ae0427587d6095f823143c1d3e4459c8640ebf0a808044ad8de1c"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.2.1"
   lazy_load_scrollview:
     dependency: "direct main"
     description:

+ 1 - 0
pubspec.yaml

@@ -123,6 +123,7 @@ dependencies:
   simple_connection_checker: ^0.3.4
   upgrader: ^11.3.1
   youtube_player_iframe: ^5.2.1
+  lazy_load_indexed_stack: ^1.2.1
 
 dev_dependencies:
   flutter_test: