dco_decode_dart_barcode_builder method

  1. @protected
DartBarcodeBuilder dco_decode_dart_barcode_builder(
  1. dynamic raw
)
override

Implementation

@protected
DartBarcodeBuilder dco_decode_dart_barcode_builder(dynamic raw) {
  // Codec=Dco (DartCObject based), see doc to use other codecs
  final arr = raw as List<dynamic>;
  if (arr.length != 4)
    throw Exception('unexpected arr length: expect 4 but see ${arr.length}');
  return DartBarcodeBuilder(
    text: dco_decode_opt_String(arr[0]),
    textPosition:
        dco_decode_opt_box_autoadd_dart_barcode_text_position(arr[1]),
    system: dco_decode_opt_box_autoadd_dart_barcode_system(arr[2]),
    font: dco_decode_opt_box_autoadd_dart_barcode_font(arr[3]),
  );
}