TdlibBase class abstract
Cheatset
Tdlib tg = Tdlib(
pathTdl: "libtdjson.so",
clientOption: {
"api_id": 121315,
"api_hash": "saskaspasad"
},
);
tg.on("update", (UpdateTd update) async {
print(update.raw);
});
tg.initIsolate();
- Implemented types
- Implementers
Constructors
-
TdlibBase({String? pathTdl, TelegramClientLibraryTdlibOptionParameter? clientOption, int task_max_count = 10000, int task_min_cooldown = 10, String event_invoke = "invoke", String event_update = "update", EventEmitter? eventEmitter, Duration? delayUpdate, double timeOutUpdate = 1.0, Duration? delayInvoke, Duration? invokeTimeOut, bool isAutoGetChat = false, bool isInvokeThrowOnError = true, FutureOr<
String> on_generate_extra_invoke(int client_id, TdlibBase libTdJson)?, FutureOr<Map> on_get_invoke_data(String extra, int client_id, TdlibBase libTdJson)?, FutureOr<void> on_receive_update(dynamic update, TdlibBase libTdJson)?})
Properties
- client_option → TelegramClientLibraryTdlibOptionParameter
-
final
-
clients
→ Map<
int, TdlibClient> -
final
- delay_invoke ↔ Duration
-
getter/setter pair
- delay_update ↔ Duration?
-
getter/setter pair
- event_emitter ↔ EventEmitter
-
latefinal
- event_invoke → String
-
final
- event_update → String
-
final
- first_client_id → int
-
no setter
- getFormatLibrary → String
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- invoke_time_out ↔ Duration
-
getter/setter pair
- is_auto_get_chat ↔ bool
-
getter/setter pair
- is_init_isolate ↔ bool
-
getter/setter pair
- is_invoke_throw_on_error ↔ bool
-
getter/setter pair
- isolate ↔ Isolate
-
getter/setter pair
-
on_generate_extra_invoke
↔ FutureOr<
String> Function(int client_id, TdlibBase libTdJson)? -
getter/setter pair
-
on_get_invoke_data
↔ FutureOr<
Map> Function(String extra, int client_id, TdlibBase libTdJson)? -
getter/setter pair
-
on_receive_update
↔ FutureOr<
void> Function(dynamic update, TdlibBase libTdJson)? -
getter/setter pair
- path_tdlib ↔ String
-
getter/setter pair
- receivePort → ReceivePort
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- task_count ↔ int
-
getter/setter pair
- task_max_count ↔ int
-
getter/setter pair
- task_min_cooldown ↔ int
-
getter/setter pair
- timeOutUpdate ↔ double
-
getter/setter pair
Methods
-
createclient(
{required int clientId, int clientUserId = 0, TelegramClientLibraryTdlibOptionParameter? clientOption, bool isBot = false, bool isVoid = false, bool isAutoSetOptionIfEmpty = true}) → Future< Map> - add this for multithread on flutter apps
-
ensureInitialized(
) → Future< void> -
existClientId(
int clientId) → bool - ahis for handle update api add this for handle update api
-
exitClientById(
int clientId, {bool isClose = false, String? extra, bool isInvokeThrowOnError = true}) → Future< bool> -
getAllClientIds(
) → List< int> - get all client id
-
getClientById(
int clientId) → TdlibClient? -
getClientByUserId(
int clientUserId) → TdlibClient? -
init(
) → Future< void> -
invoke(
String method, {Map? parameters, required int clientId, Duration? functionTimeOut, bool isVoid = false, Duration? delayDuration, Duration? invokeTimeOut, bool? isUseCache = false, Duration? durationCacheExpire, String? extra, bool? isAutoGetChat, bool? isInvokeThrowOnError, FutureOr< String> onGenerateExtraInvoke(int client_id, TdlibBase libTdJson)?, FutureOr<Map> onGetInvokeData(String extra, int client_id, TdlibBase libTdJson)?}) → Future<Map> - call api latest Tdlib-Methods example:
-
invokeRaw(
{required Map parameters, required int clientId, required bool isVoid, required Duration delayDuration, required Duration invokeTimeOut, required Duration functionTimeOut, required bool isUseCache, required Duration durationCacheExpire, required String extra, required bool isAutoGetChat, required bool isInvokeThrowOnError, required FutureOr< String> onGenerateExtraInvoke(int client_id, TdlibBase libTdJson)?, required FutureOr<Map> onGetInvokeData(String extra, int client_id, TdlibBase libTdJson)?}) → Future<Map> - call api latest Tdlib-Methods example:
-
invokeSync(
{required Map parameters, bool isThrowOnError = true}) → Map - call api latest Tdlib-Methods example:
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
on(
String type_update, FutureOr callback(UpdateTd update), {Map? stateData, void onError(Object data)?}) → EventEmitterListener - receive all update data
-
platformType(
) → String -
create client id for multi client
inherited
-
request(
String method, {Map? parameters, required int clientId, bool isVoid = false, Duration? delayDuration, Duration? invokeTimeOut, String? extra, bool? isUseCache, Duration? durationCacheExpire, bool? isAutoGetChat, FutureOr< String> onGenerateExtraInvoke(int client_id, TdlibBase libTdJson)?, FutureOr<Map> onGetInvokeData(String extra, int client_id, TdlibBase libTdJson)?, bool? isInvokeThrowOnError}) → Future<Map> -
task_decrease(
) → void -
task_increase(
) → void -
td_create_client_id(
) → int -
inherited
-
td_execute(
Map parameters) → Map< String, dynamic> -
td_send
client_execute
inherited
-
td_send(
int clientId, Map parameters) → void -
td_send
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateClientById(
int clientId, {required TdlibClient newTdlibClient, String? extra, bool isInvokeThrowOnError = true}) → Future< bool>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited