execute method

Future<TResponse> execute(
  1. Future<DynamicMap?> callback(
    1. DynamicMap? map
    )
)

The value is actually passed to the server side for execution.

実際にサーバー側に値を渡して実行します。

Implementation

Future<TResponse> execute(
  Future<DynamicMap?> Function(DynamicMap? map) callback,
) async {
  final input = toMap();
  final res = await callback.call(input);
  if (res == null) {
    return throw Exception("Response is empty.");
  }
  return toResponse(res);
}