Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Use same future for several FutureBuilder

In my page I have many FutureBuilder that share the same data from a future. As the future is a request from Firebase, I just want to do it one time. Do you have a solution ?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Whenever you FutureBuilder calls the future, you can store its value inside a variable.

After that, you can pass that variable in your widgets via the constructor or if you are in the same stateful widget then you can directly assign it via setstate method.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading