Humans are mistaken to think that a dog's life is empty, sad and miserable unless it gets a lot of petting. A dog needs such display of affection too, but it is not crucial.
Quantity of love towards your dog is not measured in time spent petting it and playing with it. It simply cannot replace the walk. It should come after the walk, or when the dog is calm, obedient, when it did something well. It will accept then, more naturally and more completely, that type of affection.
After a structured walk which is consisted of rules – in which a dog does not show behavioural problems – play with it, pet it... Show it a positive emotion that will confirm that the dog did the right thing. You will also reward dog's stability. If it displayed unwanted behaviour, and then on your request it corrects itself – it is the perfect time for your dog to feel that this makes you happy.
A reward can be playing with you, or plying with its favourite dog or toy. This is why it is important for it to have one or more toys.
The dog should eat after the walk. Afterwards, dogs usually like to sleep. There is no better proof that your dog is calm and that it feels good than relaxed sleep.
You should not pet it when it barks, growls, shows dominance, aggressiveness, fear, anxiety, hyperactivity... These are the states in which a dog cannot perceive and accept the meaning of petting, since its perception differs from human's.