TdlibParameters class

Inheritance

Constructors

TdlibParameters({required bool useTestDc, required String databaseDirectory, required String filesDirectory, required bool useFileDatabase, required bool useChatInfoDatabase, required bool useMessageDatabase, required bool useSecretChats, required int apiId, required String apiHash, required String systemLanguageCode, required String deviceModel, required String systemVersion, required String applicationVersion, required bool enableStorageOptimizer, required bool ignoreFileNames})
Contains parameters for TDLib initialization
const
TdlibParameters.fromJson(Map<String, dynamic> json)
Parse from a json
factory

Properties

apiHash String
apiHash Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org
final
apiId int
apiId Application identifier for Telegram API access, which can be obtained at https://my.telegram.org
final
applicationVersion String
applicationVersion Application version; must be non-empty
final
clientId int?
client identifier
no setterinherited
databaseDirectory String
databaseDirectory The path to the directory for the persistent database; if empty, the current working directory will be used
final
deviceModel String
deviceModel Model of the device the application is being run on; must be non-empty
final
enableStorageOptimizer bool
enableStorageOptimizer If set to true, old files will automatically be deleted
final
extra → dynamic
callback sign
no setterinherited
filesDirectory String
filesDirectory The path to the directory for storing files; if empty, database_directory will be used
final
hashCode int
The hash code for this object.
no setterinherited
ignoreFileNames bool
ignoreFileNames If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
systemLanguageCode String
systemLanguageCode IETF language tag of the user's operating system language; must be non-empty
final
systemVersion String
systemVersion Version of the operating system the application is being run on. If empty, the version is automatically detected by TDLib
final
useChatInfoDatabase bool
useChatInfoDatabase If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies use_file_database
final
useFileDatabase bool
useFileDatabase If set to true, information about downloaded and uploaded files will be saved between application restarts
final
useMessageDatabase bool
useMessageDatabase If set to true, the library will maintain a cache of chats and messages. Implies use_chat_info_database
final
useSecretChats bool
useSecretChats If set to true, support for secret chats will be enabled
final
useTestDc bool
useTestDc If set to true, the Telegram test environment will be used instead of the production environment
final

Methods

copyWith({bool? useTestDc, String? databaseDirectory, String? filesDirectory, bool? useFileDatabase, bool? useChatInfoDatabase, bool? useMessageDatabase, bool? useSecretChats, int? apiId, String? apiHash, String? systemLanguageCode, String? deviceModel, String? systemVersion, String? applicationVersion, bool? enableStorageOptimizer, bool? ignoreFileNames}) TdlibParameters
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