buildResponseParam2<S extends ResponseParam, V1, V2> function

S buildResponseParam2<S extends ResponseParam, V1, V2>(
  1. ServerRpcVersion? version,
  2. V1 arg1,
  3. V2 arg2, {
  4. String? label,
  5. Iterable<ParamBuilderEntry2<S, V1, V2>> versionBuilers = const [],
  6. required S nullVersionBuilder(
    1. V1 arg1,
    2. V2 arg2
    ),
  7. S defaultVersionBuilder(
    1. V1 arg1,
    2. V2 arg2
    )?,
})

Implementation

S buildResponseParam2<S extends ResponseParam, V1, V2>(
  ServerRpcVersion? version,
  V1 arg1,
  V2 arg2, {
  String? label,
  Iterable<ParamBuilderEntry2<S, V1, V2>> versionBuilers = const [],
  required S Function(V1 arg1, V2 arg2) nullVersionBuilder,
  S Function(V1 arg1, V2 arg2)? defaultVersionBuilder,
}) =>
    _buildParam(
      label: label,
      version: version,
      args: [arg1, arg2],
      versionBuilers: versionBuilers
          .map((e) => MapEntry(e.key, (args) => e.value(args[0], args[1]))),
      nullVersionBuilder: (args) => nullVersionBuilder(args[0], args[1]),
      defaultVersionBuilder: defaultVersionBuilder != null
          ? (args) => defaultVersionBuilder(args[0], args[1])
          : null,
    );