(Reuters) - Fizzy drinks maker A.G. Barr Plc posted an 8 percent rise in full-year revenue on Tuesday, "well ahead" of the market performance, but pointed to economic volatility and uncertainty from Britain's vote to leave the European Union.

The maker of popular Scottish soft drink Irn-Bru said revenue rose to 277.7 million pounds in 2017, from 257.1 million pounds a year earlier. Pretax profit climbed 4.2 percent to 44.9 million pounds.

The company said it grew its market share within the UK soft drinks sector.

"The UK economic landscape is expected to remain uncertain for business as a whole, with regulation, changing customer dynamics and consumer preferences adding further volatility for the soft drinks industry," CEO Roger White said.

A.G. Barr, based just outside Glasgow, said margins had been hurt by the continued weakness in sterling, hitting its input costs, particularly sugar and packaging which are priced in euros.

The company, which has been selling soft drinks in Britain since 1875, said it now expects up to 99 percent of its portfolio to contain less than 5 grams of sugar per 100ml before the implementation of the soft drinks industry levy next month.

This follows the British government's decision to impose a levy on makers of sugary drinks following an advocation from health campaigners.

A change in the secret recipe for A.G Barr's Irn Bru, a sticky-sweet fizzy beverage prized as a hangover cure and known as Scotland's second national drink, prompted outrage among its many devotees in January.

(Reporting by Noor Zainab Hussain and Rahul B in Bengaluru; Editing by Subhranshu Sahu)