Session class final

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

Inheritance
Available extensions
Annotations
  • @immutable

Constructors

Session({required int id, required bool isCurrent, required bool isPasswordPending, required bool isUnconfirmed, required bool canAcceptSecretChats, required bool canAcceptCalls, SessionDeviceType? deviceType, required int apiId, required String applicationName, required String applicationVersion, required bool isOfficialApplication, required String deviceModel, required String platform, required String systemVersion, required int logInDate, required int lastActiveDate, required String ipAddress, required String location})

Properties

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

Methods

copyWith({int? id, bool? isCurrent, bool? isPasswordPending, bool? isUnconfirmed, bool? canAcceptSecretChats, bool? canAcceptCalls, SessionDeviceType? deviceType, int? apiId, String? applicationName, String? applicationVersion, bool? isOfficialApplication, String? deviceModel, String? platform, String? systemVersion, int? logInDate, int? lastActiveDate, String? ipAddress, String? location}) Session

Available on Session, provided by the SessionExtensions extension

getConstructor() String
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
override
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(Map<String, dynamic>? json) Session?

Constants

constructor → const String