The galaxy-wide stellar initial mass function (gwIMF) of a galaxy in dependence on its metallicity and star formation rate can be calculated by the integrated galactic IMF (IGIMF) theory. This theory has been applied in a study of the chemical evolution of the ultra-faint dwarf (UFD) satellite galaxies, but failed to reproduce the data. Here, we find that the IGIMF theory is naturally consistent with the data. We applied the time-evolving gwIMF, which was calculated at each time step. The number of type Ia supernova explosions that forms per unit stellar mass was renormalised according to the gwIMF. The chemical evolution of Boötes I, one of the best-observed UFD, was calculated. Our calculation suggests a mildly bottom-light and top-light gwIMF for Boötes I, and that this UFD has the same gas-consumption timescale as other dwarfs, but was quenched about 0.1 Gyr after formation. This is consistent with independent estimations, and it is similar to Dragonfly 44. The recovered best-fitting input parameters in this work are not covered in previous work, creating a discrepancy between our conclusions. In addition, a detailed discussion of the uncertainties is presented to address the dependence of the chemical evolution model results on the applied assumptions. This study demonstrates the power of the IGIMF theory in understanding star formation in extreme environments and shows that UDFs are a promising pathway to constrain the variation of the low-mass stellar IMF.