I've been running through this for along time and i'm still stuck.

I'm working on a chat app using Flutter/Dart that it's based on Websocket .
I would like to keep the state of a connected user alive even if he terminates the app.
At this moment :

Foreground : Fully working

Paused : Fully Working

Background : Fully Working

Terminated : Not Working

I'm using [Websocket\_manager](https://pub.dev/packages/websocket_manager) as a package to help

Thank you for your time.