Nathan Brown’s side lost key halfback Luke Walsh with a back problem early on in the encounter, but rallied to win a close game 16-12.
“Wigan-Saints derbies are always tough encounters, and this was the same,” said Flanagan.
“Losing Luke Wash so early provided a bit of adversity for us. But, saying that, Wigan have got a lot of injuries as well.
“It was a great spectacle for the fans, going right down to the wire, but gladly for us we came out on top.”
Flanagan felt that Saints had had to really dig deep to come up with the win, and had prepared for a game which would go right to the final whistle.
“We said at half-time that it was all about character, because we knew it was going to go right down to the wire,” he added.
“When you’re on your own line, and defending set after set you’ve got to bust your arse, and you’ve got to keep covering for your team-mate, and do the little one percenters that make the big difference.
“We did that in the end, and Wigan are a great side, they’re really good in attack.
“I think we handled them pretty well and we scored some good tries of our own.”