title: Why variable value is not refreshing in flutter?
body: <p>The variable value is not refreshing in flutter(which I created outside the class). The following way I have added.So in button press am setting different value. So if I come back to that screen again it is not showing 1. May I know why it is happening?</p>
  
  <pre><code>int _currVal = 1;
  
  class AskFragment extends StatefulWidget {
    static const String routeName = "//";
    static const
    int currState = -1;
  
    @override
    HomeScreenState createState() =&gt; HomeScreenState();
  }
  </code></pre>