It is not just about the child's safety though, it is basic manners.
When I walk my dogs I am often on my lunch break and thus in a hurry, I do not have time to stop and entertain your child just because I have a dog with me. If they ask I can reply "Sorry, darling, I am in a rush today, another time maybe" Or "Yes, but only for a wee while because I need to get back to work soon. The black doggy likes children, but don't touch the white one, he's sometimes grumpy" however if your child simply runs up to me and plonks themselves on the floor in front of me I am not always able to get away in time, or warn them in time not to touch the white dog, who would not be aggressive to children, but does not actively like them and looks at me with big, sad "stop them please" eyes, when children harass him, he is only interested in walking and peeing up bushes, he does not want to meet your child, as lovely as he or she may be. Ditto if your child runs up to me and grabs hold of one of my dogs, I don't have time to have to stop to physically extract my dogs from your child's arms.
Also I get children following me, like I am some kind of dog owning pied piper. I get very wary about continuing walking and taking them too far away from their parents, who are not always watching them as closely as they should be.
Sometimes I have my headphones in and have to take them out to respond to the child, meaning they can her my music through the now dangling round my neck headphones. I don't want to have to explain to your child what a threesome is when they hear P!nk belting out what she wants to do now her partner has left her.
One of my dogs is a very fragile breed, so I'd appreciate a heads up if your child does not yet know not to push down with all their might or pat her as hard as they can, not because she might bite, but because her bones are easily broken and whilst she is insured I can assure you that if your child injures my dog because you were not paying close enough attention to them, it will not be me paying the excess on the insurance.
When I am clearly out running, but happen to have a dog with me, I am running. You would not let your child approach runner without a dog to ask them about their phone/ipod/running shoes, so don't let them approach me to ask about my dog, ditto when I am cycling and happen to have a dog with me.
If my dog is taking a shite and I am busy getting a shite bag and not paying attention to the not shitting dog, do not let your child simply walk over and start petting my dogs, because without my attention and commands the small one will try to climb on your child's lap and lick their face, if you ask I can show them how to pet her without her doing this. The white dog will try and avoid your child, which ime, upsets them (the children not the dog)
All that said I do try and be polite with children, despite the fact that I am not always fond of other people's children, as is my right, but if you are the fifth person to get in front of me in as many minutes and just start manhandling my "puppy" who is actually just a very small adult dog, don't be surprised if I am short with you and curtly ask you to leave us alone.
If I notice that a child is wary but clearly longing to stroke my "puppy" I will always try and stop to make time for them. Lots of parents have expressed grateful surprise when their usually terrified of dogs child takes an interest in getting close to my puppy and later tell me that that experience with my 'puppy' helped their child immensely in dealing with their fear. I know a fear of dogs is always upsetting for children and their parents so I am happy to help if I have time.
I have a right to enjoy public spaces without being harassed by other people's children, having a cute dog with me does not negate that right. Just be respectful, that is all I ask and in return I will make sure my dogs are respectful of your right to enjoy public spaces without harassment from them.