AG Barr shares have risen by 1.6% as the UK soft drinks firm booked a 21% increase in full-year profits on a market that has proved more resilient than expected.