In the tweet confirming he switched his official residency from New York to Florida, President Trump said, “Despite the fact that I pay millions of dollars in city, state and local taxes each year, I have been treated very badly by the political leaders of both the city and state.”

As if on cue, those leaders instantly proved his point.

“Good riddance,” thundered Gov. Cuomo. “Don’t let the door hit you on your way out,” chimed in Mayor de Blasio.

Their sneering hostility is yet another example of how Cuomo and de Blasio are failing to take advantage of having a fellow New Yorker in the White House. Do they really believe they can heap abuse on Trump, and he will grant their ­every wish for federal aid?

Do they shower their harshest critics with generous favors?

Trump is the first New Yorker to be president since FDR, yet city and state Democrats won’t even show basic respect for the office. Instead of honey, it’s all bile and vinegar as they engage in constant attacks and use their power to harass, investigate and punish the president, his family and his businesses.

Acting like hitmen for the national party, de Blasio pledged to cancel all contracts the city has with Trump’s firm and Cuomo signed a law allowing Congress to get Trump’s state tax returns.

Their politics-first agenda is good for their credibility among the hate-Trump crowd, but they are wasting a precious opportunity to get help from Washington.

As I wrote in July, they should copy then-Mayor Ed Koch’s wooing of GOP President Ronald Reagan. “I’m trying to run this city in a nonpartisan or bipartisan way in the sense that I want to run it as a first-rate business,” Koch explained.

But these days, New York is paying a high price for the pols’ partisan games, and now the price is going up because Trump has had enough. His (much lower) taxes will go to Florida, which manages to serve more people than New York at about half the cost, and he and Melania can vote in a swing state.

Moreover, the nasty attacks on Trump won’t be lost on other wealthy New Yorkers thinking about joining the exodus. The fact that they can save 13% on their income taxes alone is one reason to flee the Vampire State for the Sunshine State. The 2017 federal tax law that limited the deduction of state and local taxes is another.

Trump, of course, has unique reasons for getting out. In a Friday interview, he previewed later tweets, including one about the growing attacks on the NYPD, and added more details.

“I love New York but it can never be great again under Cuomo and de Blasio,” he told me by phone, saying the governor has “weaponized” prosecutors against him, mentioning Manhattan District Attorney Cy Vance Jr., who is suing to get Trump’s federal tax returns, and state Attorney General Letitia James.

“I am working on one of the biggest company deals in the world,” the president said, “but they don’t want to come to New York because they don’t want to be sued.”

He declined to name the firm involved, saying its executives don’t want to be listed on the New York stock exchanges because of the probability that James would find a reason to sue them.

“She campaigned against me, saying she was going to use her office to go after me,” he said. I noted that the city’s new corporation counsel, Jim Johnson, appointed by de Blasio Thursday, said targeting Trump would be his No. 1 job.

“It’s so unfair, just so unfair,” Trump said. “It really is. They should be holding parades, they should be proud to have someone from the city as president of the United States.”

I sensed both anger and hurt in his voice, especially when he said at one point, “Who needs this?”

He is especially angry over James’ suit against his foundation. Although Trump’s lawyers agreed to shut it down in a settlement over charges he misused money, he called the suit “unfair” and said he got zero financial benefit.

“It’s a horrible thing, there’s never been anything like this in the history of our country,” he said, “where the local people go after you.”

I asked if he had spoken to Senate Minority Leader Chuck Schumer about any of this. “Schumer and I haven’t spoken,” he said, noting ­another wasted opportunity by a New Yorker.

Trump also claimed that no New York pols, although angry over the $10,000 limit on deducting state and local taxes, made the case to him against that provision, known as SALT.

“Maybe I could have done something,” he said. “But I never got any calls about it.”

He sounded wistful about an ­earlier generation of New Yorkers who, despite partisan and personal differences, banded together in hard times to work for the common good.

“In the old days, men like Lew Rudin would have come down here,” the president said. “They should have called me, they should have been down here by the hundreds, like they were in the old days.”

Indeed, Rudin, a developer and tireless city booster, successfully lobbied Reagan to reject a similar SALT proposal in the 1980s.

With that, Trump was gone, off to a meeting and then to a raucous rally in Tupelo, Mississippi. There he celebrated the military raid that led to the death of Islamic State leader Abu Bakr al-Baghdadi.

“It ended his wretched life and punched out his ticket to hell,” Trump said to thunderous applause.

Regarding that seminal event, Cuomo and de Blasio seem to have made no comment. Apparently their rule is that if you can’t say something nasty about the president, say nothing at all.

Blowin’ whistle on Dem

Media reports on the resignation of Rep. Katie Hill generally agree with the Democrat that she was forced from Congress by “revenge porn,” meaning the explicit photos she says were leaked by her estranged husband.

But wouldn’t it also be accurate to describe the leaker as a whistleblower? After all, the photos involved allegations that Hill had affairs with a campaign aide and congressional staffer, and the House responded by launching an ethics investigation. Speaker Nancy Pelosi welcomed Hill’s resignation, saying it was “untenable” for her to stay in office.

Thus, the leaker, albeit in a crude way, performed a public service by exposing Hill’s alleged misconduct.

Puttin’ on the brass

Reader Avrum Hyman has a keen observation about the literal appearance of US Army Lt. Colonel Alexander Vindman before the House impeachment squad. He writes: “In a move designed to increase the value of his testimony, Vindman showed up in full dress Army blues, resplendent with medals and gold braid, the equivalent of a ‘Black Tie’ in civilian life. When was the last time anyone was seen testifying before Congress in a tuxedo?”