The widow of slain NYPD Detective Wenjian Liu didn’t celebrate Christmas for years after his 2014 murder.

But a small yet precious miracle reignited Pei “Sanny” Xia Chen’s holiday spirit — the daughter she conceived with her late husband and a little help from science, she told The Post in an exclusive Christmas Eve interview.

“This is all for her. I always want her to be happy,” Chen said of 2 ¹/₂-year-old daughter Angelina, as the tot played with stuffed animals in the family’s festive Bergen Beach, Brooklyn, living room.

Nearby was a huge Christmas tree — with Wenjian’s police hat perched on top in place of a star.

Chen brought out a portrait of Wenjian, and the toddler, dressed in a sparkly red dress, pointed excitedly at it and said, “That’s daddy!”

Chen said, “I want her to know that her father is watching her. I want her to have the same faith I have.”

Chen, 37, said the joyful toddler — conceived with Wenjian’s sperm two years after his death — is a “miracle” who has helped her heal from her loss.

Chen and Wenjian, 32, had only been married three months when he and his partner Rafael Ramos, 40, were gunned down five days before Christmas 2014. The two officers were fatally ambushed by cop-hating Ismaaiyl Brinsley as they sat in their marked squad car on a Bedford-Stuyvesant street corner.

“We used to have the whole families get together” for the holidays before Wenjian died, Chen said.

“After his death, we stopped. Every time we got together, it reminded us that we lost a loved one.”

At the hospital when Wenjian died, “the only thing in my mind was, ‘He wants a family,’” Chen recalled.

“We had been dating so long, seven years, so we were always talking about having a family.

“I spoke to the doctor and said, ‘Is it possible to collect his sperm?’”

It was.

Later that night, Chen said, she had a dream in which her husband came to her, dressed in a white robe, and handed her a baby girl.

“That dream had so much impact on me,” Chen said. “It was very peaceful, comforting … I believe God sent him to me.

“I always feel like he’s still with me.”

Chen went forward with the in-vitro fertilization process, and 10 months later, in July 2017, Angelina was born.

“She looks exactly like him,” her mom said, adding that she’s reminded of Wenjian every time she looks at their daughter.

“She’s truly a miracle,” Chen said, calling her little girl “the best medication” for healing.

“She brought life to us. She brought joy to our lives. Every time my in-laws come over to visit us, I can see the happiness on their faces.”

Her in-laws and parents, who all live nearby in Brooklyn, are expected to come over and spend Christmas Day, as are friends, Chen said.

Healing from the loss of her “soulmate” has been far from easy, she said.

“It’s very difficult, always difficult,” Chen said. “As a single mom, I try to fill the role of mother and father. I try not to get too emotional in front of [Angelina] because she doesn’t understand. I just want to show her the happiness, the love, not the sadness.

“I try my best to make her happy.”

Also helpful in the grieving process is the black Labrador Chen adopted after Wenjian’s death. She named him Liu, after her husband.

“My friend suggested I go adopt a dog,” Chen said. The pooch “provides me security, protection, companionship and unconditional love.”

Chen also keeps busy with the Detective WenJian Liu Foundation, which she recently started. It aims to help the survivors of fallen first responders by providing them with therapy dogs.

“I want to help other families to have the same healing process,” she said.

In the days leading to Wenjian’s death, the newlyweds were still deciding on Christmas plans, having just returned from their honeymoon in China.

Chen had been looking forward to gifting her new husband a pair of polarized sunglasses to wear when he went fishing, one of his favorite hobbies — but never got the chance.

This year, their daughter got her new red dress from her mother, plus books — as well as several gifts from their family in blue.

“Since the day my husband died, they told me that they would always be there for me — and they have been,” Chen said of the NYPD and police unions.

A couple of nights ago, two cops knocked on her door, arms full of presents for Angelina, who understands three languages, English, Mandarin and Cantonese, and is a budding dancer.

“I want her to feel like she has a huge family, a family in blue,” Chen said. “The men and women who are so caring, generous, forever — they are truly the finest.”