@Somepup100
I think a simple 'no thank you' would have done and just repeat it if he still thinks the dog would like it. He wasn't trying to hurt your dog, was just being friendly. You were there so no harm was done other than you being rude to someone who was trying to be friendly. That'll teach him.
As pp said, OP had tried a simple 'no thank you' and it didn't work. Some people just won't be told.
My daughter's husband, I'll call him John, is like that.
We were all at my other daughter's house a number of years ago for Christmas lunch - we both had our dogs with us - when John started throwing raisins to his dog.
My dog was a puppy at the time and obviously would snaffle anything.
I asked him to stop because, as I said to him, raisins can kill dogs and I was scared that if he dropped one, my dog would pick it up and it might harm her.
Yes, he was ignorant of the danger, he'd probably never heard that raisins can kill dogs - clearly they'd done his dog no harm - but because he thinks he knows everything about everything he dismissed what I was saying and just went on throwing the raisins.
I got a bit panicky tbh and the more panicky I got the funnier he thought it was and just went on ignoring me, throwing the raisins and laughing at my reaction.
He did stop eventually, but for weeks afterwards every time he saw me he would bring it up and laugh at how panicky I'd been.
Yes, John is a dick, but there are a lot of them about. Some people just won't be told by a simple no thank you and you have to get a bit more forceful with them; clearly the man in the park was one of that type.