Session constructor

const Session({
  1. required int id,
  2. required bool isCurrent,
  3. required bool isPasswordPending,
  4. required bool isUnconfirmed,
  5. required bool canAcceptSecretChats,
  6. required bool canAcceptCalls,
  7. required SessionType type,
  8. required int apiId,
  9. required String applicationName,
  10. required String applicationVersion,
  11. required bool isOfficialApplication,
  12. required String deviceModel,
  13. required String platform,
  14. required String systemVersion,
  15. required int logInDate,
  16. required int lastActiveDate,
  17. required String ipAddress,
  18. required String location,
  19. dynamic extra,
  20. int? clientId,
})

Session (session) - basic class

Contains information about one session in a Telegram application used by the current user. Sessions must be shown to the user in the returned order.

  • id: Session identifier.
  • isCurrent: True, if this session is the current session.
  • isPasswordPending: True, if a 2-step verification password is needed to complete authorization of the session.
  • isUnconfirmed: True, if the session wasn't confirmed from another session.
  • canAcceptSecretChats: True, if incoming secret chats can be accepted by the session.
  • canAcceptCalls: True, if incoming calls can be accepted by the session.
  • type: Session type based on the system and application version, which can be used to display a corresponding icon.
  • apiId: Telegram API identifier, as provided by the application.
  • applicationName: Name of the application, as provided by the application.
  • applicationVersion: The version of the application, as provided by the application.
  • isOfficialApplication: True, if the application is an official application or uses the api_id of an official application.
  • deviceModel: Model of the device the application has been run or is running on, as provided by the application.
  • platform: Operating system the application has been run or is running on, as provided by the application.
  • systemVersion: Version of the operating system the application has been run or is running on, as provided by the application.
  • logInDate: Point in time (Unix timestamp) when the user has logged in.
  • lastActiveDate: Point in time (Unix timestamp) when the session was last used.
  • ipAddress: IP address from which the session was created, in human-readable format.
  • location: A human-readable description of the location from which the session was created, based on the IP address.

Implementation

const Session({
  required this.id,
  required this.isCurrent,
  required this.isPasswordPending,
  required this.isUnconfirmed,
  required this.canAcceptSecretChats,
  required this.canAcceptCalls,
  required this.type,
  required this.apiId,
  required this.applicationName,
  required this.applicationVersion,
  required this.isOfficialApplication,
  required this.deviceModel,
  required this.platform,
  required this.systemVersion,
  required this.logInDate,
  required this.lastActiveDate,
  required this.ipAddress,
  required this.location,
  this.extra,
  this.clientId,
});