blobRecordFw<T> method

Future<Fw<T>> blobRecordFw<T>({
  1. required int id,
  2. required R createRecord(),
  3. required BiDi<List<int>, T> bidi,
  4. required T defaultValue,
  5. required DspReg disposers,
})

Implementation

Future<Fw<T>> blobRecordFw<T>({
  required int id,
  required R Function() createRecord,
  required BiDi<List<int>, T> bidi,
  required T defaultValue,
  required DspReg disposers,
}) async {
  return recordFw(
    id: id,
    bidi: BiDi(
      forward: (record) => bidi.forward(record.blob),
      backward: (message) => createRecord()..blob = bidi.backward(message),
    ),
    defaultValue: defaultValue,
    disposers: disposers,
  );
}