Session class final
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.
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})
-
Session (session) - basic class
const
-
Session.fromJson(Map<
String, dynamic> json) -
Parse from a 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?
-
clientId client identifier
final
- currentObjectId → String
-
TDLib object type for current class instance
no setteroverride
- deviceModel → String
-
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
-
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 - Copy model with modified properties.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Convert model to TDLib JSON format
override
-
toString(
) → String -
Convert model to TDLib JSON format, encoded into String.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- defaultObjectId → const String
- TDLib object type