fromCode static method

BarcodeType fromCode(
  1. int code
)

Implementation

static BarcodeType fromCode(int code) {
  return BarcodeType.values.firstWhere(
        (type) => type.code == code,
    orElse: () => BarcodeType.unknown,
  );
}