logout static method

void logout(
  1. Function? logoutCallback
)

Clears user session and creates a new one. Use this when another user wants to use the app.

Implementation

static void logout(Function? logoutCallback) async {
  if (logoutCallback != null) {
    bool result = await _channel.invokeMethod('logout', [
      {"logoutCallback": true}
    ]);
    if (result) {
      logoutCallback();
    }
  } else {
    await _channel.invokeMethod('logout');
  }
}