logout method

Future<void> logout(
  1. BuildContext context
)

Implementation

Future<void> logout(BuildContext context) async {
  await _sessionManager.clearSession();
  await CookieManager.instance().deleteAllCookies();
  Navigator.of(context).pushNamedAndRemoveUntil('/', (route) => false);
}