SessionEventHandler class Null safety

Represents a class to notify user session event.

This is base class that you can mixin, so that you can register on SendbirdSdk.addSessionEventHandler. Typically you want to use this class as following:

class MyHandler with SessionEventHandler {
  void onCloseSession() {
     //user logic here when session is closed
Implemented types




hashCode int
The hash code for this object.
runtimeType Type
A representation of the runtime type of the object.


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
onSessionClosed() → void
Informs when the SDK can't refresh the session. App should force a user to a login page to connect again.
onSessionError(SBError error) → void
Informs when the SDK run into an error while refreshing the session key
onSessionExpired() → void
Informs when session key is expired.
onSessionRefreshed() → void
Informs when SDK refreshed the session key.
onSessionTokenRequired(dynamic successCb(String), Function failCb) → void
App needs to fetch a new token. Pass on the new (retrieved) token to SDK via success(NEW_TOKEN) or fail() if fetch failed. In case when app decides not to refresh the session for this user, they should call success(null).
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.