'flutter web state not working in firebase hosting

any one can guide me facing an issue on flutter web.

Provider for state management. Flutter version 2.10.3 (stable)

the issue i am facing is the app is not rebuilding/change states when i deploy flutter web app to firebase hosting but its working fine in localhost while debugging. it could be resolve with wrapping in setState but i want to manage it without setState. any one knows what could be the reason or some one face the same issue before...

i'm replacing widget

on Button tap

void changeScreen(int index) {
if (index != currentScreenIndex) {
  this.currentScreenIndex = index;
  notifyListeners();
}}

Body has Column widget containing stateless "DashboardTopbar" widget and rest for sidebar and body.

Column(
        children: [
          DashboardTopbar(sizingInformation),
          Expanded(
            child: Row(
              children: [
                if (applicationController.isCurrentSettingsScreen) ...[
                  DashboardSidebar(sizingInformation),
                ] else ...[
                  Expanded(
                    flex: applicationController.dashboardSidebarFlex,
                    child: DashboardSidebar(sizingInformation),
                  ),
                ],
                Expanded(
                  flex: applicationController.dashboardBodyFlex,
                  // child: applicationController.currentScreen(),
                  child:Consumer<ApplicationController>(
                    builder: (_,provider,__){
                      return provider.appBodyScreen[provider.currentScreenIndex];
                    },
                  ),
                ),
              ],
            ),
          ),
        ],
      );


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source