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

Constructors

Session({required int id, required bool isCurrent, required bool isPasswordPending, required bool isUnconfirmed, 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 ipAddress, required String location, 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)
Parses a Session from TDLib JSON.
factory

Properties

apiId → int
Telegram API identifier, as provided by the application
final
applicationName → String
Name of the application, as provided by the application
final
applicationVersion → String
The version of the application, as provided by the application
final
canAcceptCalls → bool
True, if incoming calls can be accepted by the session
final
canAcceptSecretChats → bool
True, if incoming secret chats can be accepted by the session
final
clientId → int?
Identifier of the TDLib client that sent this object.
final
deviceModel → String
Model of the device the application has been run or is running on, as provided by the application
final
extra → dynamic
"@extra" of the request this object answers.
final
hashCode → int
The hash code for this object.
no setterinherited
id → int
Session identifier
final
ipAddress → String
IP address from which the session was created, in human-readable format
final
isCurrent → bool
True, if this session is the current session
final
isOfficialApplication → bool
True, if the application is an official application or uses the api_id of an official application
final
isPasswordPending → bool
True, if a 2-step verification password is needed to complete authorization of the session
final
isUnconfirmed → bool
True, if the session wasn't confirmed from another session
final
lastActiveDate → int
Point in time (Unix timestamp) when the session was last used
final
location → String
A human-readable description of the location from which the session was created, based on the IP address
final
logInDate → int
Point in time (Unix timestamp) when the user has logged in
final
platform → String
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
Version of the operating system the application has been run or is running on, as provided by the application
final
type → SessionType
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? isUnconfirmed, 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? ipAddress, String? location, dynamic extra, int? clientId}) → Session
Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.
getConstructor() → String
TDLib type name, e.g. updateNewMessage.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this object to TDLib JSON.
override
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

CONSTRUCTOR → const String
TDLib type name.