Session 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

Inheritance

Constructors

Session({String? extra, int? client_id, int64? id, Bool? is_current, Bool? is_password_pending, Bool? can_accept_secret_chats, Bool? can_accept_calls, SessionType? type, int32? api_id, string? application_name, string? application_version, Bool? is_official_application, string? device_model, string? platform, string? system_version, int32? log_in_date, int32? last_active_date, string? ip, string? country, string? region})
Session.fromMap(Map<String, dynamic> map)

Properties

api_id int32?
Telegram API identifier, as provided by the application
getter/setter pair
application_name string?
Name of the application, as provided by the application
getter/setter pair
application_version string?
The version of the application, as provided by the application
getter/setter pair
can_accept_calls Bool?
True, if incoming calls can be accepted by the session
getter/setter pair
can_accept_secret_chats Bool?
True, if incoming secret chats can be accepted by the session
getter/setter pair
client_id int?
TDLib client id; maps to the field @client_id.
getter/setter pairinherited
country string?
A two-letter country code for the country from which the session was created, based on the IP address
getter/setter pair
device_model string?
Model of the device the application has been run or is running on, as provided by the application
getter/setter pair
extra String?
Matches requests with responses; maps to the field @extra.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
id int64?
Session identifier
getter/setter pair
ip string?
IP address from which the session was created, in human-readable format
getter/setter pair
is_current Bool?
True, if this session is the current session
getter/setter pair
is_official_application Bool?
True, if the application is an official application or uses the api_id of an official application
getter/setter pair
is_password_pending Bool?
True, if a 2-step verification password is needed to complete authorization of the session
getter/setter pair
last_active_date int32?
Point in time (Unix timestamp) when the session was last used
getter/setter pair
log_in_date int32?
Point in time (Unix timestamp) when the user has logged in
getter/setter pair
platform string?
Operating system the application has been run or is running on, as provided by the application
getter/setter pair
region string?
Region code from which the session was created, based on the IP address
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
system_version string?
Version of the operating system the application has been run or is running on, as provided by the application
getter/setter pair
tdType String
JSON object type; maps to the field @type.
no setteroverride
type SessionType?
Session type based on the system and application version, which can be used to display a corresponding icon
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson({dynamic skipNulls = true}) String
Serialize a Td instance to a JSON string. If skipNulls is true the fields with null values are not serialized.
inherited
toMap({dynamic skipNulls = true}) Map<String, dynamic>
Create a Map from a Td instance.
override
toString({dynamic skipNulls = false}) String
A string representation of this object.
inherited

Operators

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