request method

Future<Map> request(
  1. String method, {
  2. Map? parameters,
  3. required int clientId,
  4. bool isVoid = false,
  5. Duration? delayDuration,
  6. Duration? invokeTimeOut,
  7. String? extra,
  8. bool? isUseCache,
  9. Duration? durationCacheExpire,
  10. bool? isAutoGetChat,
  11. FutureOr<String> onGenerateExtraInvoke(
    1. int client_id,
    2. TdlibBase libTdJson
    )?,
  12. FutureOr<Map> onGetInvokeData(
    1. String extra,
    2. int client_id,
    3. TdlibBase libTdJson
    )?,
  13. bool? isInvokeThrowOnError,
})

Implementation

Future<Map> 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> Function(int client_id, TdlibBase libTdJson)?
      onGenerateExtraInvoke,
  FutureOr<Map> Function(String extra, int client_id, TdlibBase libTdJson)?
      onGetInvokeData,
  bool? isInvokeThrowOnError,
}) async {
  return await invoke(
    method,
    parameters: parameters,
    clientId: clientId,
    isVoid: isVoid,
    isUseCache: isUseCache,
    durationCacheExpire: durationCacheExpire,
    delayDuration: delayDuration,
    invokeTimeOut: invokeTimeOut,
    extra: extra,
    isAutoGetChat: isAutoGetChat,

    onGenerateExtraInvoke: onGenerateExtraInvoke,
    // onGenerateExtraInvoke: onGenerateExtraInvoke,
    onGetInvokeData: onGetInvokeData,
    isInvokeThrowOnError: isInvokeThrowOnError,
  );
}