title: passing data immediately without using setstate
body: <p>Is there a way to pass data when from alert dialogue box to the same screen immediately without using setstate?</p>
  <pre><code> Widget setupShadeColorContainer(
        List&lt;ShadeColorDatabase&gt; allShadeData, BuildContext context) {
      return SizedBox(
        height: 300.0, // Change as per your requirement
        width: 300.0, // Change as per your requirement
        child: GridView.builder(
            shrinkWrap: true,
            itemCount: allShadeData.length,
            gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
                crossAxisCount: 4, crossAxisSpacing: 10, mainAxisSpacing: 10),
            itemBuilder: (ctx, i) {
              return GestureDetector(
                onTap: () {
                  rPassedChooseColor = allShadeData[i].rValue;
                  gPassedChooseColor = allShadeData[i].gValue;
                  bPassedChooseColor = allShadeData[i].bValue;
                  setState(() {
                    Navigator.pop(context, [
                      rPassedChooseColor,
                      gPassedChooseColor,
                      bPassedChooseColor
                    ]);
                  });
                },
                child: Container(
                  child: Stack(
                    children: [
                      Container(
                        color: Color.fromRGBO(
                            allShadeData[i].rValue!.toInt(),
                            allShadeData[i].gValue!.toInt(),
                            allShadeData[i].bValue!.toInt(),
                            1),
                      ),
                      Padding(
                        padding: const EdgeInsets.only(top: 45, left: 5),
                        child: Text(&quot;${allShadeData[i].colorCode}&quot;),
                      )
                    ],
                  ),
                ),
              );
            }),
      );
    }
  
    showAllColors(
        List&lt;ShadeColorDatabase&gt; shadeData, BuildContext context) async {
      final size = MediaQuery.of(context).size;
      final GlobalKey&lt;FormState&gt; _form = GlobalKey&lt;FormState&gt;();
      TextEditingController searchController = TextEditingController();
      showDialog(
          barrierDismissible: true,
          context: context,
          builder: (ctx) {
            return WillPopScope(
              onWillPop: () async =&gt; false,
              child: AlertDialog(
                title: Center(
                  child: Column(
                    children: [
                      Row(
                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
                        children: [
                          Text(
                            &quot;Fashion's Color&quot;,
                            style: TextStyle(
                                color: ChooseColor(0).appBarColor1, fontSize: 14),
                          ),
                          IconButton(
                              onPressed: () {
                                Navigator.pop(context);
                              },
                              icon: const Icon(Icons.clear))
                        ],
                      ),
                      Form(
                          key: _form,
                          child: Column(
                            children: [
                              TextFormField(
                                decoration: InputDecoration(
                                  border: const OutlineInputBorder(
                                    borderSide: BorderSide.none,
                                  ),
                                  contentPadding: EdgeInsets.symmetric(
                                      vertical: size.height * 0.001,
                                      horizontal: size.width * 0.030),
                                  errorBorder: OutlineInputBorder(
                                      borderSide: const BorderSide(
                                          color: Colors.red, width: 1),
                                      borderRadius: BorderRadius.circular(5)),
                                  // labelText: 'Phone Number',
                                  fillColor: const Color(0xffF6F9FA),
                                  filled: true,
                                  hintText: 'Search Color',
                                  prefixIcon: const Icon(Icons.search),
                                  hintStyle: TextStyle(
                                      fontSize: size.height * 0.012 +
                                          size.width * 0.012,
                                      color: Colors.black26),
                                ),
                                controller: searchController,
                              ),
                              SizedBox(height: size.height * 0.035),
                            ],
                          )),
                    ],
                  ),
                ),
                content: setupShadeColorContainer(shadeData, context),
              ),
            );
          }); 
  </code></pre>
  <p>This is my dialogue box this dilogue box open over a screen and i want to pass data from this dilogue box to the same page immediately without using setstate is there any way i can achieve that?. Thanks</p>