The effect of background flows on the response of acoustic metamaterials is a key aspect that prevented the full disclosure of their potential in those applications where an aerodynamic velocity field strongly influences the propagation of acoustic disturbances. Indeed, the classic approaches for metamaterial design do not consider the aeroacoustic interaction, and the resulting metamaterials cannot preserve their response when operating in flows. So far, only few authors have addressed the problem, mostly focusing on understanding the phenomenon or identifying corrective techniques with limited usability in practical applications. The present study proposes a general method for the modification of the mechanical properties of acoustic metacontinua to preserve their response in presence of a background flow. The method is based on the application of spacetime coordinate transformations exploiting the spacetime formal invariance of the generalised d'Alembertian. This methodology applies to the equation governing the propagation of acoustic disturbances in a metamaterial having arbitrary constitutive equations independently on the method used for its original design. The approach is validated through numerical simulations, using as a benchmark the problem of the acoustic cloaking of a cylinder impinged by a perturbation generated by an isotropic point source within a flowing medium. Numerical results are obtained for an asymptotic Mach number [Formula: see text].