— Sen. Elizabeth Warren’s first presidential campaign foray to this early voting state merged the economic views she has honed for years and the lesson learned by successful Democratic candidates in the midterm elections two months ago.

She aimed directly at voters tempted by President Trump’s angry populism in 2016 but avoided mentions of Trump himself almost entirely.

“Our 2020 issue will be how we talk about what we stand for,” Warren said, when asked why she was not taking on Trump, something she has not been shy about doing in the past.

“Our affirmative vision of how we build a country that reflects our best values. That’s what I try to talk about every chance I get.”

For Warren, virtually every position she advocated was, in policy terms, a repudiation of the president and the course he has set for the nation in his first two years.

That was true from specifics — her demand that presidential candidates release their taxes, which the president has refused to do — to the generic — her repeated lament that the middle class has been hollowed out as economic and political fairness has been lost.

She connected issues that galvanize the left under the idea that America’s political and economic system is “corrupt” — the precise word used in 2016 by both Trump and Sen. Bernie Sanders (I-Vt.) — and that is preventing working-class families from getting ahead.

Implicit in that was criticism of both Trump and, more broadly, of politics as practiced in Washington.

“The heart of it is this question of corruption,” Warren told a crowd in Sioux City on Saturday morning. “Every issue that affects us in this country right now . . . they intersect with this fundamental question of who government works for.”

The senator from Massachusetts made nearly identical pitches on her five-town, three-day tour of the western side of the state, projecting energy and eagerness to engage with voters even as she was hobbled by a cold that made her voice raspy. She spoke to crowds that totaled about 2,700 people during the trip — addressing each for about an hour.

Before she entered politics, Warren was an academic studying consumer bankruptcy, and much of her focus in office has followed that vein. But as she outlined her agenda in Iowa, Warren expanded beyond that: She proposed an anti-corruption bill that would ban lawmakers from becoming lobbyists, advocated stronger unions and touted a constitutional amendment guaranteeing the right to vote.

“We need to attack, head on, the costs that are crushing ­middle-class families,” she said, listing health care, housing, child care and education. “Those are investments we need to make as a country,” Warren said.

Missing from Warren’s overarching presentation were the micro issues that are of particular interest to Iowa. She said little about agriculture and gave a vague answer when asked about the recently passed farm bill.

“It has some good provisions,” said Warren, who voted for the bill. She added: “It’s got a lot of compromises in it. And I think we need a farm bill that works better for smaller farms. That’s the part that interests me the most.”

Warren also took pains to broaden what Democrats and other voters may know of her biography, beyond her representation of a strongly liberal state. When asked how she would appeal to conservatives, the former Harvard law professor harked back to her youth in Oklahoma and her family members who are still there.

“I have three older brothers,” Warren told a crowd at a panel for women’s right activists in Ankeny on Sunday. “And one of my three brothers is a Democrat. I love all three of my brothers.”

The brothers, she said, can all agree that “government should reflect our values.”

She linked her hardscrabble upbringing to her interest in seeking the White House. Her mother, she said, was able to save their family from poverty with a minimum-wage job.

“Back when I was in middle school . . . a minimum-wage job in America would support a family of three,” Warren said. “Today a minimum-wage job in America will not keep a mama and a baby out of poverty.”

Her message appeared to penetrate.

“I think she has the middle class in mind,” said Alison Anker, 27, after seeing Warren in Des Moines on Saturday. “She wants everyone to have an opportunity.”

During the trip, which crossed through the rolling, brown Iowa fields, Warren seemed to enjoy the enthusiastic crowds.

In Des Moines, when an audience member shouted “Do you like to dance?” Warren raised her hands in the air, and did a little kick to show her moves.

When her microphone stopped working at her first event in Council Bluffs on Friday night, she soldiered on, straining her voice. In Des Moines, she joked about it using a criticism of her by Sen. Mitch McConnell (R-Ky.) that has become a call to arms for Warren and other femalepoliticians.

“The bad news is I’ve caught a cold,” Warren said. “The good news is, nevertheless, I persist.”

At times she showed off a droll wit: “How do you debate someone who isn’t interested in civility or in facts?” one audience member asked at the Des Moines event.

Warren deadpanned: “Did you have somebody specific in mind?”

Warren avoided not only mentions of Trump but also other potential Democratic candidates, by name at least.

But she did repeat her call that Democrats running for president refrain from self-funding, an obvious reference to possible candidates such as former New York mayor Michael Bloomberg or environmental activist Tom Steyer. Both have spent tens of millions in recent elections and have more to use on their own behalf.

Warren took questions from audience members at every event, using an unusual raffle system to determine who would get a question. In total, she took 31 audience queries, a number her highly organized campaign staff carefully tracked. She also took questions from reporters after four of her five events.

Warren endured a rocky few months before making her candidacy official last week, some of it caused by her October release of a DNA test meant to prove a distant relative was Native American. The claim had drawn criticism from President Trump and other Republicans; after the results were released they continued to criticize her, and she also came under fire from some Democrats upset that she’s defined ethnicity with a test.

But that came up only briefly during a trip that rewarded Warren with robust crowds and expressions of support, a year before Iowans have to choose a favorite.

After deplaning at the Omaha airport, she was recognized by several people, some of whom wished her good luck as she stood in a lengthy line for the bathroom.

And after three days in Iowa, as Warren and her aides walked briskly through a sports bar to head for a flight from Des Moines to Boston, people began to cheer.

One person on her cellphone exclaimed: “I think I just saw Elizabeth Warren!”