proto<M extends GeneratedMessage> static method

BiDi<Uint8List, M> proto<M extends GeneratedMessage>(
  1. M create()
)

Implementation

static BiDi<Uint8List, M> proto<M extends GeneratedMessage>(
    M Function() create,
    ) =>
    BiDi(
      forward: (bytes) => create()
        ..mergeFromBuffer(bytes)
        ..freeze(),
      backward: (message) => message.writeToBuffer(),
    );