start static method
Starts the runtime, or returns the one already running.
libraryPath: where libtdjson is; by defaultlibtdjson.soon Android and Linux,tdjson.dllon Windows and the app itself on iOS and macOS (link the library into the app there).logVerbosityLevel: TDLib's internal log level (0 = fatal only, 1 = errors). Higher levels cost CPU and disk.checkVersion: verify the bundled TDLib matches this package's generated API (tdlibVersion / tdlibCompatibleCommits). Turn off only for a custom build whose schema you know matches.staleClientIds: client identifiers from an earlier run of this process to close before starting (see liveClientIds).
Implementation
static Future<TdRuntime> start({
String? libraryPath,
int logVerbosityLevel = 1,
bool checkVersion = true,
Duration defaultTimeout = const Duration(seconds: 30),
Iterable<int> staleClientIds = const [],
}) {
final running = _instance;
if (running != null && !running._closed) return Future.value(running);
return _starting ??= _start(
libraryPath: libraryPath,
logVerbosityLevel: logVerbosityLevel,
checkVersion: checkVersion,
defaultTimeout: defaultTimeout,
staleClientIds: staleClientIds,
).whenComplete(() => _starting = null);
}