how to call setstate inside alert dialog