  We solve the classical square-lattice dimer model with periodic boundaries
and in the presence of a field $\boldsymbol{t}$ that couples to the (vector)
flux, by diagonalizing a modified version of Lieb's transfer matrix. After
deriving the torus partition function in the thermodynamic limit, we show how
the configuration space divides into 'topological sectors' corresponding to
distinct values of the flux. Additionally, we demonstrate in general that
expectation values are $\boldsymbol{t}$-independent at leading order, and
obtain explicit expressions for dimer occupation numbers, dimer-dimer
correlation functions and the monomer distribution function. The last of these
is expressed as a Toeplitz determinant, whose asymptotic behavior for large
monomer separation is tractable using the Fisher-Hartwig conjecture. Our
results reproduce those previously obtained using Pfaffian techniques.
