The following proposition and corollary are from Anton Deitmar's A First Course in Harmonic Analysis:
Proposition 3.4.6 Let $f\left(x\right)=e^{-\pi x^2}$. Then $f\in\mathcal S$ and $\widehat f=f$.
Corollary 3.4.7 We have $$\int_{-\infty}^\infty e^{-x^2}\,dx=\sqrt\pi.$$ Proof: The proposition implies $$\int_{-\infty}^\infty e^{-\pi x^2}\,dx=1,\tag{$\star$}$$ from which the corollary follows by a simple substitution. Q.E.D.
I understand everything except how the proposition implies $\left(\star\right)$. I tried evaluating $\int_{-\infty}^\infty\widehat f\left(y\right)\,dy$ to no avail.
Here, $\mathcal S$ is the Schwartz-Bruhat space, and
$$\widehat f\left(y\right)=\int_{-\infty}^\infty f\left(x\right)e^{-2\pi ixy}\,dx.$$
So $\widehat{f}(0)=f(0)=e^{-\pi\cdot 0^{2}}=1$, but $\widehat{f}(0)=\displaystyle\int_{-\infty}^{\infty}e^{-\pi x^{2}}e^{-2\pi ix\cdot 0}dx=\int_{-\infty}^{\infty}e^{-\pi x^{2}}dx$.