Session class

Inheritance

Constructors

Session({required int id, required bool isCurrent, required bool isPasswordPending, required bool canAcceptSecretChats, required bool canAcceptCalls, required SessionType type, 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 ip, required String country, required String region, dynamic extra, int? clientId})
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
const
Session.fromJson(Map<String, dynamic> json)
Parse from a json
factory

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
clientId int?
clientId client identifier
final
country String
country A two-letter country code for the country from which the session was created, based on the IP address
final
deviceModel String
deviceModel Model of the device the application has been run or is running on, as provided by the application
final
extra → dynamic
extra callback sign
final
hashCode int
The hash code for this object.
no setterinherited
id int
id Session identifier
final
ip String
ip 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
lastActiveDate int
lastActiveDate Point in time (Unix timestamp) when the session was last used
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
region String
region Region code from which the session was created, based on the IP address
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
type SessionType
type Session type based on the system and application version, which can be used to display a corresponding icon
final

Methods

copyWith({int? id, bool? isCurrent, bool? isPasswordPending, bool? canAcceptSecretChats, bool? canAcceptCalls, SessionType? type, int? apiId, String? applicationName, String? applicationVersion, bool? isOfficialApplication, String? deviceModel, String? platform, String? systemVersion, int? logInDate, int? lastActiveDate, String? ip, String? country, String? region, dynamic extra, int? clientId}) Session
getConstructor() String
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson([dynamic extra]) Map<String, dynamic>
override
toString() String
A string representation of this object.
inherited

Operators

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

Constants

CONSTRUCTOR → const String