The phase difference $(\phi)$ between the wavelets from the top edge and the bottom edge of the slit is $\phi=\frac{2 \pi}{\lambda}(d \sin \,\theta)$, where $d$ is the slit width.
The first minima of the diffraction pattern occurs at
$\sin \,\theta=\frac{\lambda}{d}$, so $\phi=\frac{2 \pi}{\lambda}\left(d \times \frac{\lambda}{d}\right)=2 \pi$