title: flutter problem: change state of bottomSheet
body: <p>Here I want to change my Icon when first time will click on &quot;A-Z Alphabetically&quot; then my isSelectAlpha will be true then my Icon will be &quot;UP&quot; when I click again on &quot;A-Z Alphabetically&quot; then will be change &quot;DOWN&quot; icon.</p>
  <p>But Its not working when I reload the page then my Icon is Changing.</p>
  <p>This is my bottomSheet code</p>
  <pre><code>  var isSelectAlpha;
  bottomSheet() {
      showModalBottomSheet(
          context: context,
          // shape: const RoundedRectangleBorder(
          //   borderRadius: BorderRadius.vertical(
          //     top: Radius.circular(25.0),
          //   ),
          // ),
          builder: (context) {
            return Padding(
              padding: const EdgeInsets.fromLTRB(20, 20, 20, 13),
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                mainAxisSize: MainAxisSize.min,
                children: &lt;Widget&gt;[
                  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Text(
                        &quot;Filter&quot;,
                        style: TextStyle(
                            fontSize: tSize18, fontWeight: FontWeight.w500),
                      ),
                      Text(
                        &quot;Clear&quot;,
                        style: TextStyle(
                            fontSize: tSize14,
                            fontWeight: FontWeight.w500,
                            color: skyBlue),
                      ),
                    ],
                  ),
                  SizedBox(
                    height: 20,
                  ),
                  Divider(thickness: 2),
                  SizedBox(
                    height: 10,
                  ),
                  Text(
                    &quot;Short&quot;,
                    style:
                    TextStyle(fontSize: tSize18, fontWeight: FontWeight.w500),
                  ),
                  SizedBox(
                    height: 20,
                  ),
                  InkWell(
                      onTap: () {
                        if (isSelectAlpha == null) {
                          isSelectAlpha = false;
                        }
                        alphabeticallyFunc();
                      },
                      child: Container(
                        height: 35,
                        child: Row(
                          mainAxisAlignment: MainAxisAlignment.start,
                          children: [
                            isSelectAlpha == true
                                ? Icon(Icons.arrow_upward)
                                : isSelectAlpha == false ? Icon(
                                Icons.arrow_downward):Container(),
                            SizedBox(
                              width: 10,
                            ),
                            Text(
                              &quot;A-Z&quot;,
                              style: TextStyle(
                                  fontSize: tSize16, fontWeight: FontWeight.w500),
                            ),
                            SizedBox(
                              width: 15,
                            ),
                            Text(
                              &quot;Alphabetically&quot;,
                              style: TextStyle(
                                  fontSize: tSize14,
                                  fontWeight: FontWeight.w400,
                                  color: darkGreyColor),
                            ),
                          ],
                        ),
                      )),
                  Divider(),
                  InkWell(
                      onTap: () {},
                      child: Container(
                        height: 35,
                        child: Row(
                          mainAxisAlignment: MainAxisAlignment.start,
                          children: [
                            Text(
                              &quot;Invested Value&quot;,
                              style: TextStyle(
                                  fontSize: tSize16, fontWeight: FontWeight.w500),
                            ),
                            SizedBox(
                              width: 15,
                            ),
                          ],
                        ),
                      )),
                  Divider(),
                  InkWell(
                      onTap: () {
                        // searchHoldingsList.sort((a, b) =&gt; b[&quot;invested_value&quot;].compareTo(a[&quot;invested_value&quot;]));
                        investFunc();
                      },
                      child: Container(
                        height: 35,
                        child: Row(
                          mainAxisAlignment: MainAxisAlignment.start,
                          children: [
                            Text(
                              &quot;Profit &amp; Loss&quot;,
                              style: TextStyle(
                                  fontSize: tSize16, fontWeight: FontWeight.w500),
                            ),
                            SizedBox(
                              width: 15,
                            ),
                          ],
                        ),
                      )),
                ],
              ),
            );
          });
    }
  </code></pre>
  <p>this is my anotherFunction Whitch is change my bool</p>
  <pre><code>  alphabeticallyFunc() {
      print(&quot;alphabetically&quot;);
      isSelectAlpha = !isSelectAlpha;
      print(isSelectAlpha);
      setState(() {});
    }
  
  </code></pre>
  <p>How to do it please help.</p>