After an impeccably observed minute’s silence in honour of former skipper Dave Mackay who passed away earlier this month, Hearts began on the front foot, dominating early possession.
But a mix-up at the back allowed Chris Duggan to break free early on and the Hearts defence were relieved to see the Dumbarton striker volley over the bar.
Hearts fashioned a couple of chances soon after, but Dumbarton keeper Daniel Rogers was equal to the task, comfortably saving efforts from Sam Nicholson and Moussa Sow.
Sow almost scored a spectacular opener in the 28th minute but Rogers made a fine save to deny the Swedish-born striker from long-range before gathering the follow-up.
The former Crystal Palace striker had another opportunity to put Hearts ahead before the interval but his flick from Wilson’s low cross was saved by Rogers at his near post.
Genero Zeefuik almost got Hearts off to the perfect start in the second half but the Dutchman was unable to beat Rogers with a low effort after some trickery from Sow.
And predictably, it was Sow who opened the scoring for Hearts after firing home the second ball following a corner from Nicholson on 52 minutes.
Nicholson had a couple of chances as the game drifted past the hour mark but neither of the 20-year-old’s efforts found the target.
But on 68 minutes Hearts doubled their advantage when Wilson leapt to meet substitute King’s corner to steer a header into the top right corner.
Nicholson, Morgaro Gomis and James Keatings were all denied by Rogers after Hearts had added their second as the league leaders threatened to add a third.
And they got the third their attacking play warranted five minutes before full-time through King. The youngster danced past several Dumbarton defenders before slotting into the bottom right corner to score a magnificent individual effort.
But the substitute wasn’t finished there as he raced into the area to fire past Rogers in the last minute of the game to put the gloss on an emphatic victory for champions-elect Hearts.