Context. In spite of enormous progress and brilliant achievements in cosmological simulations, they still lack numerical resolution or physical processes to simulate dwarf galaxies in sufficient detail. Accurate numerical simulations of individual dwarf galaxies are thus still in demand. Aims. We aim to improve available numerical techniques to simulate individual dwarf galaxies. In particular, we aim to (i) study in detail the coupling between stars and gas in a galaxy, exploiting the so-called stellar hydrodynamical approach; and (ii) study for the first time the chemodynamical evolution of individual galaxies starting from self-consistently calculated initial gas distributions.Methods. We present a novel chemodynamical code for studying the evolution of individual dwarf galaxies. In this code, the dynamics of gas is computed using the usual hydrodynamics equations, while the dynamics of stars is described by the stellar hydrodynamics approach, which solves for the first three moments of the collisionless Boltzmann equation. The feedback from stellar winds and dying stars is followed in detail. In particular, a novel and detailed approach has been developed to trace the aging of various stellar populations, which facilitates an accurate calculation of the stellar feedback depending on the stellar age. The code has been accurately benchmarked, allowing us to provide a recipe for improving the code performance on the Sedov test problem. Results. We build initial equilibrium models of dwarf galaxies that take gas self-gravity into account and present different levels of rotational support. Models with high rotational support (and hence high degrees of flattening) develop prominent bipolar outflows; a newly-born stellar population in these models is preferentially concentrated to the galactic midplane. Models with little rotational support blow away a large fraction of the gas and the resulting stellar distribution is extended and diffuse. Models that start from non-self-gravitating initial equilibrium configurations, evolve at a much slower pace owing to lower initial gas density and hence lower star formation rates. The stellar dynamics turns out to be a crucial aspect of galaxy evolution. If we artificially suppress stellar dynamics, supernova explosions occur in a medium that is heated and diluted by previous activity of stellar winds, thus artificially enhancing stellar feedback. Conclusions. The stellar hydrodynamics approach presents a promising tool for numerically studying the coupled evolution of gas and stars in dwarf galaxies.