To run this code follow https://kivy.org/doc/stable/gettingstarted/installation.html to have a project with Kivy installed.
Next, run pip install kivymd
inside of your virtaul env.
Copy paste the code above into your project. KV files into subfolder kv
and main.py
into the root of your project.
Finally, run python main.py