The textbook definition of Gauss' Law is the following:
$$ \Phi_{E} = \oint \vec{E} \bullet d\vec{A} = \frac{Q_{encl}}{\epsilon_{0}} \ \ (1)$$
But in all the examples in the book, the following diagram is used to illustrate a hypothetical Gaussian surface:
Now in all of these diagrams, the charge $q$ enclosed in the Gaussian Surface, is always as the center of it. Thus the electric field is uniform throughout the inside of this Gaussian Sphere. But what if the field is non-uniform on the inside of the Guassian Sphere (in other words if the point charge is not at the center of the Gaussian Sphere? Does $(1)$ still hold in that case?
Is $ \Phi_{E} = \oint \vec{E} \bullet d\vec{A} = \frac{Q_{encl}}{\epsilon_{0}} \ \ $ still valid for non-uniform electric fields enclosed within Gaussian Surfaces?
Take the following example:
Example: A point charge $q_1 = 3.80nC$ is located on the $x$-axis at $x = 2.1m$ and a second point charge $q_2 = -6.2nC$ is on the $y$-axis at $y=1.15m$. What is the total electric flux due to these two point charges through a spherical surface centered at the origin and with radius $r = 1.55m$?
Would the total electric flux through the Gaussian Surface just be
$$\begin{align} \Phi_{E} &= \frac{Q_{encl}}{\epsilon_{0}} \\ &= \frac{-6.2nC}{\epsilon_{0}}? \end{align}$$
As even though $q_2$ is contained within the Gaussian Surface, it does not lie at it's center