The nine-figure contracts lavished on Yu Darvish and Jason Heyward — and their subsequent performances — have been blamed for all manner of Cubs woes.

The team wasn’t in on Bryce Harper or Manny Machado? Those two megadeals were the reason. The only way the Cubs were able to add Craig Kimbrel was because of Ben Zobrist’s absence? Yep, thank the budget crunch partly created by the money due Darvish and Heyward.

The way things are going, however, some of that chatter might subside. And chatter aside, it would be a big help to the Cubs if Darvish and Heyward continue living up to their contracts as they have recently.

Heyward homered, tripled and drove in three runs and Darvish threw five strong innings to lead the Cubs to a 7-2 victory Sunday against the Brewers. Kyle Schwarber also homered for the Cubs, who completed a three-game sweep of Milwaukee and stayed atop the National League Central.

“We’ve gone back and forth with [the Brewers],” manager Joe Maddon said. “Every game is kind of the old dogfight, and they’re good. They’re really good.”

The Cubs were better this weekend, outscoring Milwaukee 17-5.

Heyward’s homer was the ninth of his career to lead off a game, and he has an OPS of .825, 94 points higher than his 2018 mark of .731. With Nicholas Castellanos playing in right, Heyward has been shifted to center and is adjusting while helping to carry the offense.

“It’s nice to play; it’s nice to have that opportunity,” Heyward said. “This game, you’ve got to earn that, and it’s nice to make the most of it.”

Darvish, meanwhile, allowed one run and five hits, struck out eight and walked none, winning his second consecutive Wrigley Field start. He was somewhat under the weather (and unavailable to the media), but his best run as a Cub continued.

He had a 2.93 ERA, struck out 36 and walked only two in July, and that momentum carried over into this game. Cubs starters haven’t issued a walk in six games, something the franchise hadn’t accomplished since at least 1905.

“He’s pitching as well as anybody in the league right now,” Maddon said. “Everybody’s going to talk about all these other dudes, but right now — physically on a game-by-game basis — nobody’s pitching better than he is.”

Cubs fans also have come around on Darvish. Replacing the lusty boos fans showered him with in 2018 before his season ended prematurely, the crowd of 40,466 greeted him with enthusiastic, drawn-out Yu’s.

“He’s pitching really well, and he has confidence,” said Anthony Rizzo, who matched a career high with four hits. “He’s having fun in the clubhouse. It’s been fun to see him evolve here as a Cub.”

Contributions from Heyward and Darvish will be especially crucial this season. The Central race is close, and the Cubs don’t know yet when they’ll get catcher Willson Contreras back on the field.

Taking all three from the Brewers didn’t hurt the Cubs’ chances, though Rizzo expects the division race to remain tight.

“It’s going to come down to the wire,’’ Rizzo said. ‘‘We know that. It can be spit out, chewed up, thrown in a hundred different computers, but it’s going to come down to the wire. That’s the way it’s going to be this year, and we’re ready.

“We’re ready to just keep playing.”