TdlibNative constructor

TdlibNative({
  1. TelegramClientLibraryTdlibOptionParameter? clientOption,
  2. Duration? delayInvoke,
  3. Duration? delayUpdate,
  4. EventEmitter? eventEmitter,
  5. String event_invoke = "invoke",
  6. String event_update = "update",
  7. Duration? invokeTimeOut,
  8. bool isAutoGetChat = false,
  9. bool isInvokeThrowOnError = true,
  10. FutureOr<String> on_generate_extra_invoke(
    1. int client_id,
    2. TdlibBase libTdJson
    )?,
  11. FutureOr<Map> on_get_invoke_data(
    1. String extra,
    2. int client_id,
    3. TdlibBase libTdJson
    )?,
  12. FutureOr<void> on_receive_update(
    1. dynamic update,
    2. TdlibBase libTdJson
    )?,
  13. String? pathTdl,
  14. int task_max_count = 10000,
  15. int task_min_cooldown = 10,
  16. double timeOutUpdate = 1.0,
})

Implementation

TdlibNative({
  super.clientOption,
  super.delayInvoke,
  super.delayUpdate,
  super.eventEmitter,
  super.event_invoke,
  super.event_update,
  super.invokeTimeOut,
  super.isAutoGetChat,
  super.isInvokeThrowOnError,
  super.on_generate_extra_invoke,
  super.on_get_invoke_data,
  super.on_receive_update,
  super.pathTdl,
  super.task_max_count,
  super.task_min_cooldown,
  super.timeOutUpdate,
}) {
  opentdLib(pathTdlib: path_tdlib);
  if (client_option["start"] == true) {
    invokeSync(
      parameters: {
        "@type": "setLogVerbosityLevel",
        "new_verbosity_level": client_option['new_verbosity_level'],
      },
    );
    ensureInitialized();
  }
}