  Flexoelectric effect is the coupling between strain, polarization and their
gradients, which are prominent at the nanoscale. Although this effect is
important to understand nanostructures, such as domain walls in ferroelectrics,
its electronic mechanism is not clear. In this work, we combined phase-field
simulations and first-principles calculations to study the 180{\deg} domain
walls in tetragonal ferroelectric PbTiO3, and found that the ultimate source of
N\'eel components is the gradient of the square of spontaneous polarizations.
Electronic structural analysis reveals that there is a redistribution of
electronic charge density and potential around domain walls, which produces the
electric field and N\'eel components. This work thus sheds light on the
electronic mechanism of the flexoelectric effect around 180{\deg} domain walls
in tetragonal ferroelectrics.
