About seven months after Oskar Lindblom was diagnosed with a rare bone cancer, the Flyers signed the left winger to a three-year contract Wednesday with an annual cap hit of $3 million, general manager Chuck Fletcher announced.

Lindblom, 23, missed most of the season as he battled Ewing’s sarcoma. He shared the team lead with 11 goals when he received the diagnosis in December, and he recently finished his chemotherapy treatments.

Fletcher said he was “hopeful” Lindblom would be one of the 31 players on the roster when the Flyers head to Toronto on Sunday and resume their season Aug. 2.

“We’ve been working toward that,” Fletcher said. “That’s certainly our goal.”

The GM said that he expected Lindblom to work out with the team and that he would be eligible to play in games, though that seems unlikely.

Lindblom has been cleared by his oncologist and the Flyers’ medical team to practice, Fletcher said. He has not been working out with the team at training camp because he needed some time after his final chemo treatment.

As for playing in the playoffs, “I don’t know what’s out of the question. I wouldn’t put any limits on Oskar,” Fletcher said. “We obviously will do whatever we can to protect him, but he’s looking forward to restarting his life and his career. Whatever that means, we’ll find out. We’ll work very closely with his medical team and our medical team and make the right decisions for him.”

Lindblom, a Sweden native, said he was excited to sign the contract, and he thanked the Flyers “for giving me this opportunity.”

“The support the organization, the fans, and the entire NHL has given me has been quite overwhelming,” he said. “I can’t wait to get back skating with the boys and being the professional hockey player I know I can be.”

The Flyers finished second in the Metropolitan Division this season and were one of the league’s best teams in the season’s second half as they rallied around Lindblom, who occasionally visited with the players after a practice or a game.

It “resonated with our team and helped our team come together,” Fletcher said. “... He was always so selfless. I’m sure it had to be very difficult on him, physically and psychologically and emotionally, and yet he never showed any signs of weakness with his teammates. He was positive. He took the battle head-on.”

The left winger could have become a restricted free agent in October, and he had salary-arbitration rights.

“Our organization believes wholeheartedly in Oskar, our players believe in him, AV and our coaching staff believe in him,” Fletcher said, referring to Alain Vigneault. “And I believe in him. We couldn’t be happier to get this three-year deal done.”

Fletcher said there were “dark times” when Lindblom got his diagnosis. “This is a young man not only entering the prime of his career but the prime of his life,” Fletcher said. “He’s been through a lot the last six, seven months. Obviously, medically, he’s in a much better spot” than in December.

Negotiations were “very amicable,” Fletcher said. “We got the deal done literally in two or three phone calls.”

Fletcher added he was “very excited to watch him continue his career and rejoin his teammates and be a very productive player for the Flyers for the years to come.”

The GM said he hoped the contract would be a “win-win” for both sides, “and as I said to him earlier today, ‘Hopefully this is the smallest contract you sign for the rest of your career.‘“

Even before his illness, “I think Oskar proved to us he was a high-character, talented player that we wanted to be a part of our future,” Fletcher said. “He’s a foundation piece for us. He’s a top-six forward.”