I find somedays the kids really don't want to be bothered with the walk to school, which I completely understand because some days I would rather stay home and continue playing as well. On those days we sing a silly little song on the way to school, it's french so I doubt it would help but translated it's kinda like "here we go, here we go, here we go, we go, we go..... where are we going? and they scream school, Why are we going and they scream to pick up x and y." this gets them in a good mood and they forget that they did not feel like it in the first place

Specific to this child, I would strongly recommend, as others did, that she either hold the stroller or a rope for safety if she wanders. At least with the safety issue addressed you could focus on distracting her with songs, games, observations of your surrounding etc.... I have a child now almost 4, who still can't walk alongside the stroller as he is so easily distracted. Although he clearly knows all the rules and safety concerns, he is simply distracted by everything so he must, at all times hold the stroller or a rope attached to it.