can someone help to write this code more efficiently please? : As you can see in first picture I'm checking that a certain value contains in a document from firestore and returns a boolean value.
now I'm calling that function in a build and based on that return value I'm changing a chip color(Second picture). Now the problem is maybe because I'm calling it in a build function so its being called continuously and on that build and it costing me aton of reads in firestore or maybe the function is inefficient idk ..... so can anyone help to write the code or give a more efficient way for this please ??
