0

so i change my statefull PageView Widget getter to _globalState so i can update the state from another widget but after i exit from the PageView to Home and comeback again to PageView it results error.

from this

class SurveyFormPage extends StatefulWidget {
      @override
      _SurveyFormPageState createState() => _SurveyFormPageState();
    }

to this

    _SurveyFormPageState _globalState = new _SurveyFormPageState();
        
        class SurveyFormPage extends StatefulWidget {   @override  
        _SurveyFormPageState createState() => _globalState; 
}

error results

enter image description here

CCP
  • 286
  • 12
  • This may help you. [link](https://stackoverflow.com/questions/51029655/call-method-in-one-stateful-widget-from-another-stateful-widget-flutter) – pasha Feb 17 '22 at 05:05

0 Answers0