destroySession method

void destroySession()

Destroys the current session.

Creates a new empty session with a new ID.

Implementation

void destroySession() {
  final newSession = SessionData.create(Session._defaultIdGenerator());
  set('_session', newSession);
}