I'm new to mobile development and I'm starting with Flutter to build a cross-platform app with a login process for Android and iOS. One of the app requirements is to keep the app session active and running permanently unless the user signs out or closes the app.
The API for the backend has a refresh token to keep the session open/alive, but the mobile OS keeps closing the app every few hours/days and restarting the login process.
How can I achieve this?