protobufEnumByIndex<P extends ProtobufEnum, E extends Enum> static method
Implementation
static BiDi<P, E> protobufEnumByIndex<P extends ProtobufEnum, E extends Enum>(
List<P> pbValues,
List<E> enumValues,
) {
assert(pbValues.length == enumValues.length);
return BiDi(
forward: (pb) => enumValues[pb.value],
backward: (enm) => pbValues[enm.index],
);
}