It's a shame to see a career that briefly held some promise (indeed, at one point the likelihood of a Premier League winners' medal in a season in which he was a fixture in the side for over half of the season) fizzle out somewhat. Let himself down big-time with the criminal assault of his girlfriend in 2017, which points towards some personal issues but remains inexcusable. 40 appearances in the last four an a half seasons must be a very hard-to-swallow reality for a professional footballer who - whatever their level - should be in his prime, however.
The easy comparison - due to their ages and the timing of their debuts - is with Jack Robinson, who dropped down a tier and has since made almost 200 appearances & worked his way back to the Premier League in the process.
Another, slightly older, is Jay Spearing - not quite the fixture that Flanagan briefly was, but made a similar number of appearances over (mostly) two seasons with us - who also dropped down a tier (and two) and has played 300-odd matches (and captained sides since).
Hopefully he can find a suitable club with whom to get back into it a bit, and play some regular football during what could yet be a 'second half' of his career.