Hi Peter,
You will be liable to Capital Gains tax if you gift the flat to your children, using the market value of the property. You can claim private residence relief for the period that the property was your main residence, to reduce the gain.
Guidance can be found at:
Shares and Capital Gains Tax (Self Assessment helpsheet HS284).
There is a calculator at:
Tax when you sell property, which follows on to the Capital Gains service, where you can report and pay the Capital Gains tax due within 60 days of the completion date.
Thank you.