Skip to content

CodecTuple2Ops<T0, T1>

extension CodecTuple2Ops<T0, T1> on Record

Provides a product operation on a 2-tuple of Codecs.

Methods

product() extension

Codec<T2> product<T2>(T2 Function(T0, T1) apply, Record Function(T2) tupled)

Available on Record, provided by the CodecTuple2Ops<T0, T1> extension

Implementation
dart
Codec<T2> product<T2>(
  Function2<T0, T1, T2> apply,
  Function1<T2, (T0, T1)> tupled,
) => Codec.product2(this.$1, this.$2, apply, tupled);