I am currently living and working in the UK under a UK spouse visa but my wife's company plans to relocate her to Germany. Would I have to apply for a German visa to be able to work in Germany? Or is that not necessary due to the freedom of movement law in the EU?

EDIT: I would like to add that I am a non-EU citizen.