Kyle Schwarber occasionally gets annoyed by defensive shifts.
‘‘They all do,’’ Cubs manager Joe Maddon said of his hitters.
One way to beat the shift is to slam an RBI double off the ivy-covered wall. Or to rip an RBI single into center field.
That’s the strategy Schwarber used to help the Cubs pull away for a 5-1 victory Sunday against the Cardinals. The Cubs completed a three-game sweep of their National League Central rivals and wrapped up a seven-game homestand 6-1.
Maddon’s crew also posted its seventh consecutive victory against the Cardinals at Wrigley Field, including six in a row this season.
‘‘They’re good, we’re good,’’ Maddon said. ‘‘Nobody is going away. This division is going to be tight all summer.’’
Meanwhile, Schwarber looks loose and relaxed at the plate. He matched a career high by extending his hitting streak to seven games and is hitting .423 (11-for-26) with three doubles, two home runs, six RBI and six runs scored during that stretch.
‘‘It’s as good as I’ve seen him ever,’’ Maddon said. ‘‘I’ve seen him really good when he first came up. Or even in the  World Series, he was outstanding. But this, if we can put this in a little bit of a time capsule, heads up.’’
Oh, and Schwarber is doing it all from the leadoff spot, where he once struggled so badly that he was demoted to the minors.
This time, Schwarber says, he feels comfortable in the leadoff spot and is happy to stay there if it means helping the team.
‘‘They’re a little bit different circumstances, but a little bit more experience there,’’ Schwarber said. ‘‘I’ve just kind of taken away the leadoff-hitter name or role or whatever it is and just go out there and take my at-bats.’’
Does Schwarber agree with Maddon that this is his best stretch in the majors?
‘‘I don’t know,’’ he said. ‘‘I’m just going out there and playing. That’s all I want to do. Just keep trying to put in quality at-bats.’’
Another Kyle — right-hander Kyle Hendricks — was equally dominant. He posted his fourth quality start in a row, limiting the Cardinals to one run in seven innings. He threw 68 of his 98 pitches for strikes.
In typical fashion, Hendricks credited catcher Willson Contreras.
‘‘What he was putting down, he could feel what the hitters were doing better than I could today,’’ Hendricks said. ‘‘So I started relying on him. He kind of had more energy, and he mentally got me to be more aggressive.’’
Carlos Gonzalez hit his first homer as a member of the Cubs, and David Bote drove in the go-ahead run with a single in the fifth. Kris Bryant rolled his ankle on a double in the first but stayed in the game.
The Cubs improved to 24-11 at home this season. They’re 13-16 on the road.
Maddon wants to see the sub-.500 road record go away, but he knows it won’t be easy with an upcoming road trip against the Rockies and Dodgers.
‘‘If you’re just playing good baseball, it doesn’t matter where you’re playing,’’ Maddon said. ‘‘And this week, we pretty much played good baseball. So I want to believe that it’s going to carry over.
‘‘We’re going to face Colorado in Colorado and then the Dodgers, who have been as good as anybody right now. So it’s going to be a really difficult task. But as long as we’re playing up to our capabilities, I’m good.
‘‘If we’re playing good baseball, we’ll go anywhere. And right now, looking at it, we’re playing pretty good baseball.’’