endSession method

  1. @override
void endSession({
  1. bool clearUserInfo = true,
})
override

Manually forces the end of the current session and starts a new session.

Only call this method if you have an application that will stay in the foreground for an extended time, such as a point-of-sale app.

If clearUserInfo is true, it clears any username, user ID, and email values set when ending the session.

Implementation

@override
void endSession({bool clearUserInfo = true}) {
  throwIfNotStarted();
  methodChannel.invokeMethod(_endSessionMethodName, {
    _clearUserInfoArgName: clearUserInfo,
  });
}