I have trying to display alert when snapshot.data value has been changed.i try the if else condition
if (sum == totalLeads) { print(totalLeads); alert();