title: Show or hide text widget based on boolean value
body: <p>I am using <a href="https://pub.dev/packages/switcher_button" rel="nofollow noreferrer">this</a> package which toggles a boolean variable value. I am using this boolean variable to show/hide a text widget. Although the value changes,the widget isn't affected at all. What am I missing here?</p>
  <pre><code> SwitcherButton(
                    key: UniqueKey(),
                    value: showDiscount,
                    onColor: Colors.greenAccent,
                    offColor: Colors.grey,
                    onChange: (value) {
                      showDiscount = !value;
                }),
                
  if(showDiscount) Text('Hello')
  </code></pre>