We report on an unusually bright observation of PSR J2051$-$0827 recorded during a regular monitoring campaign of black-widow pulsar systems with the Effelsberg 100-m telescope. Through fortunate coincidence, a particularly bright scintillation maximum is simultaneous with the eclipse by the companion, enabling precise measurements of variations in the flux density, dispersion measure (DM), and scattering strength throughout the eclipse. The flux density is highly variable throughout the eclipse, with a peak 1.7 times the average away from the eclipse, and yet does not significantly decrease on average. We recover the flux density variations from the measured DM variations using geometric optics, with a relative velocity as the only free parameter. We measure an effective velocity of (470 $pm$ 10) km/s, consistent with the relative orbital motion of the companion, suggesting that the outflow velocity of the lensing material is low, or is directly along the line of sight. The 2 per cent uncertainty on the effective velocity is a formal error; systematics related to our current model are likely to dominate, and we detail several extensions to the model to be considered in a full treatment of lensing. This is a demonstration of the causal link between DM and lensing; the flux density variations can be predicted directly through the derivatives of DM. Going forward, this approach can be applied to investigate the dynamics of other eclipsing systems, and to investigate the physical nature of scintillation and lensing in the ionized interstellar medium.