Was the flat the marital home? If not (i.e. if you lived elsewhere as a couple and let out the flat) then he should have no claim on it.
However, if the flat was the marital home then he may be trying to argue that he has built up a beneficial interest (BI) in it. This can be done in some circumstances without the person being on the legal title, but on the facts you state it seems unlikely that he would have a BI because he has made no contribution at all to the finances of the flat. If he has one at all, I don't see how it can possibly be 50% - he should certainly have no claim to any equity that arose in the 5 years before you married.
Part of your divorce will be to arrive at a financial settlement and your divorce solicitor should be able to advise you on this.