thenCustom<Next> method

CryptoFlow<Next> thenCustom<Next>(
  1. String name,
  2. FutureOr<Next> transform(
    1. Current input
    )
)

Appends an explicit caller-controlled synchronous or asynchronous step.

name must not be blank and is included in contextual failures. The caller owns the transform's security properties, resources, and internal cancellation behavior.

Implementation

CryptoFlow<Next> thenCustom<Next>(
  String name,
  FutureOr<Next> Function(Current input) transform,
) {
  if (name.trim().isEmpty) {
    throw InvalidInputException('A custom flow step name must not be empty');
  }
  return then(_OperationStep<Current, Next>(name, transform));
}